lset - move data into random file buffer
places data into a random file buffer in preparation for being moved
into the random file with a
StrVar is the name of a variable that was defined in a
StrExpr is a string expression containing the data to be placed into
the field associated with StrVar.
If StrExpr is shorter than the field associated with StrVar,
the data is inserted into the field, left-justified and padded
on the right with spaces.
If StrExpr is longer than the field, the data string is truncated
on the right and inserted into the field.
Numeric values must be converted to binary strings with
10 open "addrph" as #1 len = 150
20 field 1, 35 as n$, 80 as a$, 12 as ph$
30 lset n$ = "Basmark Corporation"
40 lset a$ = "1717 East Ninth Street, Cleveland, Ohio"
50 rset ph$ = "800-555-1212"
60 put 1
70 close 1
80 open "addrph" as #1 len = 150
90 field 1, 35 as n$, 80 as a$, 12 as ph$
100 get 1
110 print n$
120 print a$
130 print ph$
140 close 1
Lines 30 through 50 put information into the buffer, and the
statement in line 60 writes the buffer to the file.
Line 100 reads the buffer back from the file and lines 110
through 130 display the contents of the buffer.
field, get, mki$, mks$, mkd$, open, put, rset
The Basmark QuickBASIC Programmerís Manual