Ok... *NOT* A LINE CONTINUATION PARSING ERROR !
It's the number of static elements in an array assignment !26170 static elements *MAX*... if using DIM( ... ) optional method.
26169 static elements *MAX*... if using DIM( nnnn ) hardcoded method.
I tried scenarios with 1 element per line - some multiple per line mixed with 1 per line - and finally this 30 lines of 1000 elements per line.
Note: Several of the test scenario results are included as comments in the code below.
Code: Select all
PRINT "TEST_10"
print "DIM( ... )"
print "Create 30,000 data elements for assigning to an array."
print "30 rows of 1,000 elements each."
print "==> ABEND during compile."
' Code to generate 30,000 data elements ...
'print
'print "Create 30,000 data elements for assigning to an array."
'print "30 rows of 1,000 elements each."
'print
'print "NOTE: Make sure to remove the last comma ... but *not* the continuation character!"
'print
'print "After printing to the console, copy and paste the"
'print "data elements to the array assignment."
'print
'for i as integer = 1 to 30
' for k as integer = 1 to 1000
' dim x as integer = 0
' print str(x);",";
' if k = 1000 then print " _"
' next
'next
'print
'print
'
'
'
'PRINT "TEST_09"
'print "Instead of ( ... ) optional DIM argument, hardcoded ( 100000 ) argument"
'print "DIM( 100000 )"
'print "Started with one (1) element per line... (26170 elements)"
'PRINT "(+) 20 elements on first assignment line"
'print "(-) 20 single elements"
'print "==> ABEND during compile."
'print "BUT..."
'print "==> WORKS = ubound = 100000... If I go down to (26169 elements)"
'print "... maybe a hardcoded DIM argument uses some of the space available?"
'
'PRINT "TEST_08"
'print "DIM( ... )"
'print "Started with one (1) element per line... (26170 elements)"
'PRINT "(+) 20 elements on first assignment line"
'print "(-) 20 single elements"
'print "==> WORKS = ubound = 26169"
'
'PRINT "TEST_07"
'print "DIM( ... )"
'print "Started with one (1) element per line... (26170 elements)"
'PRINT "(+) 20 elements on first assignment line"
'print "(-) 10 single elements"
'print "==> ABEND during compile."
'
'PRINT "TEST_06"
'print "DIM( ... )"
'print "Started with one (1) element per line... (26170 elements)"
'PRINT "(+) 20 elements on first assignment line"
'print "==> ABEND during compile."
'
'PRINT "TEST_05"
'print "DIM( ... )"
'print "Started with one (1) element per line... (26170 elements)"
'print "==> WORKS = ubound = 26169"
'print "BUT...
'print "==> ABEND during compile... at (26171 elements)!"
'print " ===================================================="
'print "(This is what @adele noted in the message thread)"
'print " ===================================================="
'
'
'
dim shared as byte DATA_STUFF( ... ) = _
{ _
' PASTE THE 30,000 TEST ELEMENTS IN HERE... (from code above).
}
'
'
print
print
print
print "UBound() = "; ubound(DATA_STUFF)
print
print "@sero ...."
print "32/64 bit compiler issue"
print "https://www.freebasic.net/forum/viewtopic.php?f=2&t=26576"
PRINT "WORKS FOR ME IN 32 BIT"
PRINT "DOES NOT WORK FOR ME IN 64 BIT"
SLEEP