Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 149

Advertising
background image

Chapter
Commands

10

10 -19

Use the RUN command to set all variables equal to zero, clear all BASIC
evoked interrupts, and begin program execution with the first line number
of the selected program. The RUN, CONT (page 10 -3), and RROM
(page 10 -18) commands and the GOTO statement (page 11 -14) are the
only ways you can place the BASIC module interpreter into Run mode
from Command mode. Terminate program execution at any time by

pressing

Ctrl

+

C

(page 10 -4) on the console device. As long as

you have not used CALL 19 (page 12 -12) to disable

Ctrl

+

C

.

Important: Some BASIC interpreters allow a line number to follow the
RUN command (example:

RUN 100

). The BASIC module does not

permit this variation on the RUN command. Execution begins with the
first line number. To obtain a function similar to the RUN ln num
command, use the GOTO ln num statement in the Command mode.

Syntax

RUN

Return

Example

>1 REM EXAMPLE PROGRAM

>10 FOR I = 1 TO 3

>20 PRINT I

>30 NEXT I

>40 END

>RUN

1

2

3

READY

>

RUN

Advertising