Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#7
It consists of one big loop, and the IF/THEN statements are single line expressions. Example:

LINE INPUT "File to read in:",FILE$
LINE INPUT "File to write out:",FILE2$

Open FILE$ For Binary As #1: 'For reading
Open FILE2$ For Output As #2: Close #2: Open FILE2$ For Binary As #2 ':For write

Do '(Main loop goes here)

IF Lookahead$=CHR$(0) THEN G$="(output)": PUT #2 , , G$: G$=""
IF Lookahead$=CHR$(1) THEN G$="(output)": PUT #2 , , G$: G$=""
...etc
Loop

-----------------------------------

^ The output is a type of automated script done by another program. The output is QB64 source code. The lines are simple, and there are no Gosubs, Gotos, or anything else. There are just a LOT of lines, because some of them are like this: 

IF Lookahead$=CHR$(0) + CHR$ (0) THEN G$="(output)": PUT #2 , , G$: G$=""
IF Lookahead$=CHR$(0) + CHR$ (1)  THEN G$="(output)": PUT #2 , , G$: G$=""

etc

So depending on the automated data, it could be between 256 or 65,536 or (heaven forbid) even 16,777,216 if we are tasked with up to 3 characters.

If I follow the automation through to completion, it will be about (give or take) 22,000 lines. But alas, I can only do this with 9,786 and it bombs out...

There are no other nested loops or anything. Just "If X = [statement] THEN [command 1] : [command 2]: [command 3] on a single line.
Reply


Messages In This Thread
RE: Stack size limit for If/Then statements? - by JamesAlexander - 01-29-2024, 03:13 AM

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

Forum Jump:


Users browsing this thread: 1 Guest(s)