Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#3
A quick and simple test shows that the main routine isn't limited to 10,000 lines or less of code.

Code: (Select All)
$Console:Only
Open "QB64_main_test.bas" For Output As #1

Do
    Cls
    Print "PROGRAM LAST SUCCESSFULLY COMPILED AT "; total; "LINES LONG"
    For i = 1 To 1000
        total = total + 1
        Print #1, "IF x = " + Str$(total) + " THEN END"
    Next
    Print #1, "PRINT " + Str$(total)
    Shell "qb64pe.exe -x QB64_main_test.bas" 'this should compile the program for us

Loop

I started that up and let it run for a bit, curious if I'd get that same glitch where it stops at less than 10,000 lines of code.

   

As you can see from the screenshot above, it compiled and ran over 15,000 lines with zero issues -- which is where I took the screenshot.   I let it keep going, and it went to over 30,000 lines and compiled just fine, before I stopped the process.

I don't know what the actual limits of lines might be inside the main module of a QB64 program, but I'm certain it's much more than 9,876 lines of code.
Reply


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



Users browsing this thread: 10 Guest(s)