Run Command - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

(
(
(
(
(
(
RUN
[{~~~CE
LPRINTl}] LP=Dl [,RD=nl
RUN COMMAND
The RUN command starts execution of a BASIC program at the lowest numbered
executable statement. The program must already reside in the work area and the
work area must be defined as containing a BASIC program (see
LOAD Command
for loading programs from tape and defining the work area type).
BASIC programs can be run (executed) in three modes:
Normal Mode -
All program steps are executed without interruption.
Step Mode -
The 5100 stops immediately before executing
each
program step
(statement). The word STEP and the statement number of the next statement to
be executed are displayed. To execute the next program statement, or to change
execution mode, you must execute a GO command (see GO
Command).
Step
mode allows you to display or alter variable values between steps for debug purposes.
Trace Mode -
The statement number of each statement executed is displayed
and/or printed while the statement is executed.
Both step and trace modes are useful in locating programming errors. Trace provides
a more rapid view of the program steps as they are executed. Step, on the other
hand, allows you to examine the contents of variables between program steps and
to modify program steps or data.
The syntax of the RUN command is as shown:
RUN
[{~~~CE
LPRINTl}] [,P=Dl LRD=nl
where:
STEP
specifies step-by-step execution.
TRACE
specifies continued statement execution, but the line number of the
statement just executed is displayed and/or printed. Note that for
normal
mode
you do not specify STEP or TRACE.
PRINT
specifies that trace messages are printed
and
displayed (only valid with
TRACE).
P=D
specifies that output from programs specifying the printer is directed instead
to the display screen.
RD=n
allows you to specify the number of digits (n) to the right of the decimal
point that will cause rounding on printed output. The value n can be 1 to 13 and
is initially set to 6 at power on.
33

Advertisement

Table of Contents
loading

Table of Contents