Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stack size limit for If/Then statements?
#1
Hi All,

I'm developing a program where I am implementing a lot of if/then statements to do logic, but the way it is designed, I will have to use a lot of straight logical statements. I have tried using this through DATA statements and arrays, dimension the arrays as $'DYNAMIC, etc...so I am just going the straightforward route.

A sample line for an IF / THEN statement is just this:

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

where the line has about 3 or less multi-statements, and only if they are true. Is is simple, but there are many of them. I am already using a logic tool to automate the process, that is why I cannot do it another way. The automation is simple and straightforward, at the expense of stack space because each of the statements are automatically generated and then can be used in QB64 code.
 
The kicker is, I have about 9,786 lines that I can use successfully - anything more, I will get a C++ error.

I think it has to do with the Main() sub being limited to approximately 10,000 lines or less (9,786 exactly), but am not entirely sure.

How can I increase the number of logic statements and conditionals that are outside of arrays? Is it just the stack space, or will I have to do it another way?

What are my options with this? I have tried using CLEAR, and that won't do either. Is it possible to somehow allocate a tremendous amount of stack size at the risk of very minimal variables? Or perhaps edit and recompile a modified version of Qb64Pe source code that will work for this increasing the line numbers and limits?

Thanks,
James
Reply


Messages In This Thread
Stack size limit for If/Then statements? - by JamesAlexander - 01-28-2024, 10:59 PM



Users browsing this thread: 5 Guest(s)