Tandy 1000 Basic Reference Manual page 217

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10
I
BASIC
Keywords
LSET
Statement
LSET field name
=
data
Moves data to the direct access buffer and places it in
field
name,
in preparation for a PUT statement.
Field
name is a string variable defined in a FIELD statement.
You must have used FIELD to set up buffer fields before using
LSET.
You must convert numeric values to string values before they are
LSET. See MKI$, MKD$, MKS$.
You use LSET to left-justify the variable in the field. If the field
is larger than the variable it is receiving, the field is filled with
blanks on the right. If the variable is larger than the field, char-
acters are truncated on the right. The complement command to
LSET is RSET.
See also Chapter 7, "Files," and OPEN, CLOSE, FIELD, GET,
PUT, and RSET.
Example
Suppose NM$ and
AD$
have been defined as field names for a
direct access file buffer. NM$ has a length of 18 characters; AD$
has a length of 25 characters. The statements:
L S E T
N M $
=
"JIM C R I C K E T , JR."
L S E T
AD$
=
" 2 0 0 0 E A S T
P E C A N
ST."
set the data in the buffer as follows:
J I M M C R I C K E T , J R . B B M
2 0 0 0 M E A S T M P E C A N M S T . M M B ~ B M
Notice that filler blanks are placed to the right of the data
strings in both cases. If we use
RSET
statements instead of
LSET, the filler spaces are placed to the left. This is the only
difference between LSET and RSET.
215

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents