LB Booster
Programming >> Language extensions >> Two things I'd like http://lbb.conforums.com/index.cgi?board=extensions&action=display&num=1423849334 Two things I'd like
Post by Alincon 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. Re: Two things I'd like
Post by Richard Russell on Feb 13th, 2015, 5:44pm
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?