Commands
and
Statements
6-12
cannot later be assigned values with the LET statement. This
is
because strings are
assigned
new
storage locations when given new values and this destroys the effect
of
the FIELD statement. Accordingly, the LSET and RSET statements must be used to
assign new values. These commands may also be used with normal string statements.
If
the assigned string value
is
shorter than the space reserved for the string variable
in the FIELD statement, LSET left justifies the string, adding blanks (ASCII 20H)
as needed. RSf:T right justifies the string in the same way.
If
the string
is
longer than
the space reserved, the extra characters are ignored. LSET and RSET may be used
with string variables that have not been fielded. Unlike normal string assignment,
the length of the receiving string
is
not changed by an LSET or RSET assignment.
LSET
string
variable = string
expression
RSET string variable = string
expression
10
A$
= "1
23456"
20
RSET
A$
=
"A
B"
30
PRINT
A$;
"X"
40
LSET
A$
=
"C
0"
50
PRINT
A$;
"X"
RUN ABX

CO

X

Ok
MERGE
The MERGE command reads a program from disk and combines it with the current
program without changing line numbers of either program.
If
the new program and
the current program have instruction lines with the same line numbers, the new in-
struction lines replace the current ones. The
new
program must have been saved in
ASCII format. MERGE sets all variables and arrays to zero.
If
used within a pro-
gram, the program will end. A given string expression must resolve to an ISIS-II
filename.
MERGE
string
expression
MERGE ":F4:
EVAL.BAS"
Ok
NEW
The NEW command deletes the current program and clears all variables and arrays.
If
a program has not been saved and the NEW command
is
given, the program
is
lost.
NEW
In the sample program below, the program has been deleted by the NEW command.
The LIST command will not list it, or any program, until another
is
read from a
peripheral device or entered line-by-line.
240
PRINT
"end
of
program"
250
PRINT
260
PRINT
270
END
NEW
Ok
LIST
Ok
BASIC-80