Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#8
No idea what's going on for you. 

This code produces a 65,535 line program set up as you describe:

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

For x = 0 To 255
For y = 0 To 255
Print #1, "IF a$ = chr$( " + Str$(x) + ") + CHR$(" + Str$(y) + ") THEN g$ = " + Chr$(34) + "(output)" + Chr$(34) + ": PUT #2, ,g$: g$ = " + Chr$(34) + Chr$(34)
Next
Next

Shell "qb64pe.exe -x QB64_main_test.bas" 'this should compile the program for us

Compiles and runs with no issues on my system. (Even though it takes forever and ever and ever to compile.)

The generated program looks like the following:

If a$ = Chr$(0) + Chr$(0) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(1) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(2) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(3) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(4) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(5) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(6) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(7) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(8) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(9) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(10) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(11) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(12) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(13) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(14) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(15) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(16) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(17) Then g$ = "(output)": Put #2, , g$: g$ = ""
If a$ = Chr$(0) + Chr$(18) Then g$ = "(output)": Put #2, , g$: g$ = ""

From the double loops, this checks for CHR$(0) + CHR$(0) to CHR$(255) + CHR$(255), which makes for 65,536 lines of code -- which compiles and runs with no isses on my system.

What exactly is the c++ compiler error that you're getting? And which version of QB64PE are you running?
Reply


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

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

Forum Jump:


Users browsing this thread: 1 Guest(s)