2021-02-28, 06:37 PM
(2021-02-26, 09:03 PM)RandomiserUsr Wrote: Hi,
I have been developing a game and one of thing things I wanted to is build up a string and print it out but the issue I have is that I can't do the following code in zxbc :-
Code:DIM a$(100,10)
LET a$(1) = "Line 1"
PRINT a$(1)
But I can do the above in a ZX Spectrum emulator.
I know the solution is to use a$(1,1) (Ignore the zero array start)
PS Brilliant compiler!!
Thanks,
Ken
(2021-02-28, 06:19 PM)boriel Wrote:(2021-02-26, 09:03 PM)RandomiserUsr Wrote: Hi,
I have been developing a game and one of thing things I wanted to is build up a string and print it out but the issue I have is that I can't do the following code in zxbc :-
Code:DIM a$(100,10)
LET a$(1) = "Line 1"
PRINT a$(1)
But I can do the above in a ZX Spectrum emulator.
I know the solution is to use a$(1,1) (Ignore the zero array start)
PS Brilliant compiler!!
Thanks,
Ken
Yes. DIM a$(N, length) is not supported.
You have to do DIM a$(N) and if you want fill the 100 slots with " " (10 spaces).
Also, for better compatibility with Sinclair BASIC, compile with --sinclair
Thanks for confirming this :-)

