Expressions and operators, Chapter 3, Chapter – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 23

1
Publication 1746-RM001A-US-P
Chapter
3
Expressions and Operators
This chapter describes and illustrates how you manipulate and/or evaluate
expressions and statements within the BASIC program or the command line. Table
3.1 lists the corresponding mnemonics.
Table 3.1 Chapter Reference Guide
If you need (to)
Use this mnemonic Page
Absolute value
ABS( )
Return the integer value of the ASCII character.
ASC( )
Return the arctangent of the argument.
ATN( )
Retrieve data from the specified memory address.
CBY( )
Count the value converted ASCII character.
CHR( )
Return the cosine of argument.
COS( )
Retrieve or assign data to or from the internal data memory of
the BASIC or BASIC-T module.
DBY( )
Test for empty input buffer.
EOF
“e” (2.7182818) TO THE X
EXP( )
Test for number of free bytes of RAM memory.
FREE
Integer
INT( )
Read the number of bytes of memory in the current selected
program.
LEN
Natural log
LOG( )
Read the last valid memory address.
MTOP
One’s complement
NOT( )
PI-3.1415926
PI
Random number
RND
Sign
SGN
Return the sine of the argument
SIN( )
Square Root
SQR( )
Return the tangent of the argument.
TAN( )
Retrieve and/or assign the free running clock value.
TIME
Retrieve or assign data to or from the external data memory of
the module.
XBY( )
Addition
+
Division
/
Exponentiation
**
Multiplication
*
Subtraction
-
Logical AND
.AND.
Logical OR
.OR.