Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Speedreading books.
#21
This is very cool @justsomeguy. Hit a bug.

Line: 554 (in main module)
Subscript out of range
Continue?

Attaching the source file I was reading.

I think I would use something like this for sure. Appreciate you working on it.


Attached Files
.txt   dos437.txt (Size: 4.84 KB / Downloads: 31)
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#22
@grymmjack

I pushed an update that will hopefully take care of the bug. Thanks, for pointing it out!

Cheers

https://github.com/mechatronic3000/speedreader
Reply
#23
Thanks I will check it out. What does getArrayLong and setArrayLong do? I see CVL for get and MKL for set. Can you explain what this does in your program? It looks useful possibly is why I ask.
grymmjack (gj!)
GitHubYouTube | Soundcloud | 16colo.rs
Reply
#24
Quote:What does getArrayLong and setArrayLong do?
It is currently being used for an array within the '__g' UDT that contains the handles for all the font sizes. I could have well used a normal array but, I'm trying to limit the number of global variables.

Here is an example of the code usage.

Code: (Select All)
' String Array Test
' Arrays must start at index 1

TYPE tUDT
  longArray AS STRING * 1028 ' arraysize * 4 + 4
END TYPE

DIM udt AS tUDT
DIM iter AS LONG

FOR iter = 1 TO 256
  setArrayLong udt.longArray, iter, iter * 2000000
  PRINT iter; ": "; getArrayLong(udt.longArray, iter)
NEXT

FUNCTION getArrayLong& (s AS STRING, p AS LONG)
  IF p > 0 AND p * 4 + 4 <= LEN(s) THEN getArrayLong = CVL(MID$(s, p * 4, 4))
END FUNCTION

SUB setArrayLong (s AS STRING, p AS LONG, v AS LONG)
  IF p > 0 AND p * 4 + 4 <= LEN(s) THEN MID$(s, p * 4) = MKL$(v)
END SUB
Reply




Users browsing this thread: 1 Guest(s)