What’s next, Tip what’s next – Rockwell Automation 1771-DB BASIC MODULE User Manual

Page 190

Advertising
background image

Chapter
Statements

11

11 -38

Important: Define strings in your program first, unless you are executing
a CALL 77 (page 13 -6). Then, execute the CALL 77 first and define your
strings immediately after. The BASIC module executes the equivalent of a
CLEAR every time you execute the STRING statement. This is necessary
because string variables and numeric variables occupy the same external
memory space. After the STRING statement executes, all variables and
arrays are wiped out. Therefore perform string memory allocation early in
a program (in the first statement if possible). If you re-allocate string
memory you destroy all defined variables.

Important: The STRING statement turns off ONERR, CALL 38 and
ONTIME. Make sure that the STRING statement is executed before the
statements that enable interrupts.

Syntax

STRING

expr, expr

Example

>10 STRING 100,30

>20 $(0) = “–––––MONTHLY REPORT–––––”

>30 PRINT $(0)

READY

>RUN

–––––MONTHLY REPORT–––––

Call Routines
0–68

12

Tip

What’s Next?

Advertising