LB Booster
« data/read/restore »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:53am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: data/read/restore  (Read 431 times)
tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx 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 » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx 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.
« Last Edit: Feb 6th, 2014, 5:12pm by Richard Russell » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls