Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#20
Honestly, this seems to me like you'd just make it a simple text file and then go to it and get this type of information

Now, since I wrote my data as STRING * 20 for those lookup values, all I do is GET the relevant record from the random file.

DIM returnvalue AS STRING * 20
OPEN "Lookup_file.txt" FOR RANDOM AS #1 LEN = 20
GET #1, x * 65536 + y * 256 + z +1, returnvalue
PUT #2, ,_TRIM$(returnvalue)


^That's all there is to it, since my text file looks like:
Code: (Select All)
I like cheese
Rootbeer is good
Whoopie doopie do
....and so on

I like cheese corresponds to record CHR$(0) + CHR$(0) + CHR$(0).
Rootbeer is good corresponds to record CHR$(0) + CHR$(0) + CHR$(1).
Whoopie doopie do  corresponds to record CHR$(0) + CHR$(0) + CHR$(2).
...and so on
            
As for x/y/z, they correspond to  ASC(Lookahead$,1), ASC(Lookahead$,2) , ASC(Lookahead$,3).

A simple random length text file with all the data we could ever want to put in it, instantly retrievable with one simple GET.   What could be any more efficient or simpler than that, with zero looping or millions of IF checks involved?
Reply


Messages In This Thread
RE: Stack size limit for If/Then statements? - by SMcNeill - 01-31-2024, 09:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Recursion Limit bplus 14 2,520 10-17-2025, 07:46 PM
Last Post: a740g
  Feature Request: Limit Scope of a "Find" and "Change" hanness 5 717 06-21-2025, 11:21 PM
Last Post: SMcNeill
  Recursion limit? TerryRitchie 5 1,167 03-12-2024, 02:17 PM
Last Post: GareBear
  Can't set font size in Linux Circlotron 3 976 08-28-2022, 05:58 PM
Last Post: mnrvovrfc
  How can I change editor font size in Linux bigriverguy 1 722 06-22-2022, 06:15 PM
Last Post: cage

Forum Jump:


Users browsing this thread: 1 Guest(s)