Statement: ld@ [expr – Rockwell Automation 1771-DB Basic Module User Manual - Series A User Manual

Page 65

Advertising
background image

Operating Functions

Chapter 5

5–28

Examples:

u10 STRING 110,10

u10 STRING 110,10

u20 INPUT “NAME:”,$(1)

u20 INPUT “NAMES:”,$(1),$(2)

u30 PRINT “HI”,$(1)

u30 PRINT “HI”,$(1),“ AND “,$(2)

u40 END

u40 END

uRUN

uRUN

NAME: SUSAN

NAMES: BILL

HI SUSAN

?ANN
HI BILL AND ANN

READY

READY

You can assign

strings and variables with a single INPUT statement.

Example:

u10 STRING 100,10

u20 INPUT“NAME(CR), AGE – ”,$(1),A

u30 PRINT “HELLO ”,$(1),“, YOU ARE ”,A,“YEARS OLD”

u40 END

uRUN

NAME(CR), AGE –

FRED

?15
HELLO FRED,

YOU ARE 15 YEARS OLD

READY
u

Mode: COMMAND AND/OR

RUN

This statement, along with CALL 77, allows you to save/retrieve
variables

to/from a protected area of memory. This protected area is

not zeroed on power-up

or when the RUN command is issued. The LD@

statement takes

the variable stored at address [expr] and moves it to

the top of the argument stack.

For more information on protecting

variables,

see section 5.11.6, “Protected Variable Storage – CALL 77”.

5.4.16
Statement: INPUT
(continued)

5.4.17
Statement: LD@ [expr]

Advertising