Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 112

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 111
Publication 1746-RM001A-US-P
8-16 Execution Control and Interrupt Support Functions
You can push more than one expression onto the argument stack using a single
PUSH statement with multiple expressions ([expr], [expr],.[expr]). Each expression
must be followed by a comma. The last value PUSHed onto the argument stack is
the last expression [expr] encountered in the push statement.
Syntax
PUSH [expr], [expr],.[expr]
Example
>1 REM EXAMPLE PROGRAM
>10A=10
>20C=20
>30 PRINT “A = ”,A,“ ANDC=”C
>40 PUSH A,C
>50 POP A,C
>60 PRINT “A = ”,A,“ ANDC=”,C
>70 END
READY
>RUN
A = 10 AND C = 20
A = 20 AND C = 10
READY
>
>NEW
>1 REM EXAMPLE PROGRAM
>10 PUSH 0
>20 CALL 14
>30 POP W
>40 PRINT W
>50 END
READY
>RUN
0
READY
>
IMPORTANT
The argument stack can hold up to 33 floating-point numbers
before overflowing.
Page view 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 279 280

Comments to this Manuals

No comments