Stop, Stop -20, Purpose – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual

Page 116: Syntax, Example

Advertising
background image

Publication 1746-RM001A-US-P

8-20 Execution Control and Interrupt Support Functions

STOP

Purpose

Use the STOP statement to break program execution at specific points in a
program. After a program is STOPped you can display or modify variables. You can
resume program execution with a CONTinue command. The purpose of the
STOP statement is to allow for easy program debugging.

Syntax

STOP

Example

1

STOP - IN LINE 40

>1

REM EXAMPLE PROGRAM

>10 FOR I = 1 TO 100

>20 PRINT I

>30 STOP

>40 NEXT I

READY

>RUN

1

STOP - IN LINE

40

READY

>CONT

2

STOP - IN LINE

40

READY

>CONT

3

STOP - IN LINE

40

READY

>CONT

4

STOP - IN LINE

40

READY

>

NOTE

The line number printed out after execution of the STOP
statement is the line number following the STOP statement, not
the line number that contains the STOP statement.

Advertising