That it is not effective may be true, but it is also true that the code's syntax is correct.
As if it were Otherwise, I would never compile the code. I will not improve efficiency again. Anyway, if the code does not contain syntax errors, then it should be compileable. Otherwise, the fault lies on the compiler side. Nevertheless, thank you for your comment. Greetings.
Here's a quick little program -- only 4000 lines of code:
https://www.dropbox.com/s/1dqiyvgpcw33w4f/AplhaPrint4000.bas?dl=1Download a copy of it. Paste it into QB64. It's syntax is just peachy fine. Not a single glitch in it.
BUT....
It won't compile. WHY??
(For those who might not want to download the file, it's basically just a copy/paste of this one line 4000 times:
PRINT "A"; "B"; "C"; "D"; "E"; "F"; "G"; "H"; "I"; "J"; "K"; "L"; "M"; "N"; "O"; "P"; "Q"; "R"; "S"; "T"; "U"; "V"; "W"; "X"; "Y"; "Z" )
Go take a look at the C-output which we generate in temp/main.txt and see what it looks like...
444,023 lines of code!!
QB64 translates BAS to C, and PRINT is a
monster to translate. Each one of those lines translate into a hundred lines of c-code, and the compiler simply craps out eventually while trying to build it.
cc1plus.exe: out of memory allocating 16008 bytes
Now, the way around it is to fix the code so it doesn't have 4000 repititions of copy/pasted PRINT Statements. The below works just fine:
PRINT "A";
"B";
"C";
"D";
"E";
"F";
"G";
"H";
"I";
"J";
"K";
"L";
"M";
"N";
"O";
"P";
"Q";
"R";
"S";
"T";
"U";
"V";
"W";
"X";
"Y";
"Z"
Or change the code to PRINT "A" + "B" + "C" + "D" + "E" + "F" + ....
It translates to a whole lot fewer lines than print with semicolon as a delimiter, and prevents the issue...
And none of these limits is actually anything imposed by QB64 itself. It's all just the compiler hitting its internal limit on something, and there's nothing we can do for you about that.
It's a choice of either rework the code to reduce the burden on the compiler, or else find a completely different compiler and give it a shot to see if it has the same limits. Either way, there's not much we can actually do for you about the issue. It's not QB64 which is failing; it's the limits of the c-compiler itself which you're running into.