LB Booster
« Two things I'd like »

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



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: Two things I'd like  (Read 401 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Two things I'd like
« Thread started on: Feb 13th, 2015, 4:42pm »

LB4 can input several values, such as a CDF:

Code:
input #file, a$,b$,c$...
 


How about a counterpart to create a CDF?

Code:
print() #file, a$,b$,c$... 
 


where the parens enclose the delimiter character; perhaps a comma would be the default.

The second thing would be some way of denoting fields in a sequential file. Could the Field statement from random files be used somehow? Could a sequential record be read into a structure?
Harking back to the COBOL I used to use:

01 NamAdrsRecord.
05 nam$
10 last$ len 10
10 first$ len 10
05 adrs$
10 city$ len 20
10 state$ len 2
10 zip$
15 zip5 len5
15 zip4 len4

The other COBOL feature that comes to mind is 'redefines'

I know most of this is unrealistic, but for a wish list...

r.m.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Two things I'd like
« Reply #1 on: Feb 13th, 2015, 5:44pm »

on Feb 13th, 2015, 4:42pm, Alincon wrote:
How about a counterpart to create a CDF?
Code:
print() #file, a$,b$,c$...  

What's the advantage compared with doing:

Code:
    print #file, a$;",";b$;",";c$... 

which achieves the same effect without any extensions to the language?

Quote:
The second thing would be some way of denoting fields in a sequential file. Could the Field statement from random files be used somehow?

In LBB (unlike LB) you can open a file for INPUT or OUTPUT and still use the FIELD and PUT/GET statements just like you would if the file was opened as RANDOM. So, apart from the overhead of having to increment the record number each time, a sequential file in which all the records are the same length is effectively the same thing as a random file.

Does that allow you to do what you were hoping for?

Richard.
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