EasyManua.ls Logo

Radio Shack TRS-80 Model 4 - Page 252

Radio Shack TRS-80 Model 4
418 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MERGE
IMERGE'1ilespec"
Statement
I
Loads filespec, a BASIC program, and merges it with the program
currently
in
memory.
Filespec specifies a BASIC file
in
ASCII format (a program saved with
the A option).
If
filespec
is
a constant, it must be enclosed
in
quotes.
Program lines
in
the disk program are inserted into the resident
program
in
sequential order. For example, suppose that three of the
lines from the disk program are numbered
75,
85
and 90, and three of
the lines from the current program are numbered
70, 80, and 90.
When MERGE is used
on
the two programs, this portion of the new
program will
be
numbered
70,
75,
80, 85,
90.
If line numbers
on
the disk program coincide with line numbers
in
the
resident program, the disk program's lines replace the resident
program's lines.
MERGE closes all files and clears
all
variables. Upon completion,
BASIC returns to the command mode.
Example
Suppose you have a BASIC program
on
disk, PROG2ITXT (saved
in
ASCII), which you want to merge with the program you've been
working
on
in
memory. Then
we
use:
MERGE
"PROG2/T)<T"
merges the two programs.
Sample Programs
MERGE provides a convenient means of putting program modules
together. For example,
an
often-used set of BASIC subroutines can
be tacked onto a variety of programs with this command.
Suppose the following program
is
in
memory:
2-126

Other manuals for Radio Shack TRS-80 Model 4

Related product manuals