Author |
Topic: data/read/restore (Read 432 times) |
|
tsh73
Full Member
member is offline
Gender:
Posts: 210
|
|
data/read/restore
« Thread started on: Feb 6th, 2014, 3:29pm » |
|
Just found. This code runs in JB, but fails with out of data after "restore [a]" LBB version is 2.40
EDIT if I add 2 more data items after (say 11,12), ut will read _them_ instead line "[a] data 7, 8" A bug, indeed. Code:'Demo for jb2c, v.1.9
'(new features compared to 1.8)
print "initial read"
read x,y: print x,y
print "restore / read"
restore
read x,y: print x,y
print "restore numerical label / read"
restore 10
read x,y: print x,y
print "restore symbolic label / read"
restore [a]
read x,y: print x,y
' attempt to restore non-existing label, say
' restore 21
' ends up with C compiler message
' 'restore_lbl_21' undeclared
data 1, 2
10 data 3, 4
data 5, 6
[a] data 7, 8
|
« Last Edit: Feb 6th, 2014, 3:31pm by tsh73 » |
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: data/read/restore
« Reply #1 on: Feb 6th, 2014, 5:00pm » |
|
on Feb 6th, 2014, 3:29pm, tsh73 wrote:Just found. This code runs in JB, but fails with out of data after "restore [a]" |
|
LBB requires the label to be on a separate line (or, for example, a comment line) like this:
Code: data 1, 2
10 data 3, 4
data 5, 6
[a]
data 7, 8 With that change you should find your program is fully compatible with LB/JB/LBB.
Edit: Now fixed in my development version.
Richard.
|
|
|
|
|