Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
-
MOB-i-L
- Posts: 64
- Joined: Mon Apr 19, 2010 12:13 am
- Location: Lund, Skåne/Scania, Sweden
-
Contact:
Post
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.
Last edited by
MOB-i-L on Wed Mar 19, 2014 8:12 am, edited 1 time in total.
-
XavSnap
- Posts: 1946
- Joined: Sat May 10, 2008 4:23 pm
- Location: 'Zx81 France' Fb group.
Post
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.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
-
Paul
- Posts: 1533
- Joined: Thu May 27, 2010 8:15 am
- Location: Germanys west end
Post
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.
In theory, there is no difference between theory and practice. But, in practice, there is.