05-19-2025, 11:42 AM
(05-19-2025, 06:31 AM)RhoSigma Wrote: Which version of QB64-PE are you using:
Quote:DIM SHARED AS STRING segment(1).
REDIM _PRESERVE segment AS STRING.
REDIM _PRESERVE segment * 57 AS STRING.
The latter two lines are completly wrong, that's not the way how array (re)dimming works. If I paste the above lines into the IDE I immediatly get syntax errors and arn't even able to start compiling the code.
4.1.0.
Yes, I see that the redim dimension is missing in what I typed. My bad, it was late for me. I didn't copy the code. In the program the dimensions are there.
Initial declaration: DIM SHARED AS STRING wires(20), filename, segments(1)
Doesn't cause compiler errors: REDIM _PRESERVE AS STRING segments(iy)
Causes compiler errors: REDIM _PRESERVE AS STRING * 57 segments(iy)
The point was that redimming as a fixed length string resulted in the compiler errors, but the IDE didn't flag that something was amiss.
It's not the having, it's the doing.