Page 1 of 1

LET A(2 TO 4)=A(5 TO 7) doesn't work

Posted: Sun Mar 16, 2014 4:23 pm
by MOB-i-L
On the ZX81 I do

Code: Select all

10 DIM A$(10)
20 LET A$(2 TO 4)=A$(5 TO 7)
30 DIM A(10)
40 LET A(2 TO 4)=A(5 TO 7)
But I get syntax-error on the last line after 2. I think this should work because this works in MATLAB. Still, it's good that it works for strings.

Re: LET A(2 TO 4)=A(5 TO 7) doesn't work

Posted: Sun Mar 16, 2014 7:11 pm
by XavSnap
Hi,
This syntaxe is wrong...
30 DIM A(10)
40 LET A(2 TO 4)=A(5 TO 7)
... a A(2 TO 4) is not a string value!


But,
30 DIM A(10,7)
40 LET A(2, 4)=A(5,7)
is Ok.

Re: LET A(2 TO 4)=A(5 TO 7) doesn't work

Posted: Sun Mar 16, 2014 9:27 pm
by Paul
I wonder if the developer(s) of the Sinclair Basic ROM had a working copy of matlab ;) as a reference for developing Sinclair Basic.