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

Page 23

Advertising
background image

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( )

3-9

Return the integer value of the ASCII character.

ASC( )

3-12

Return the arctangent of the argument.

ATN( )

3-8

Retrieve data from the specified memory address.

CBY( )

3-16

Count the value converted ASCII character.

CHR( )

3-14

Return the cosine of argument.

COS( )

3-8

Retrieve or assign data to or from the internal data memory of
the BASIC or BASIC-T module.

DBY( )

3-16

Test for empty input buffer.

EOF

3-15

“e” (2.7182818) TO THE X

EXP( )

3-11

Test for number of free bytes of RAM memory.

FREE

3-15

Integer

INT( )

3-10

Read the number of bytes of memory in the current selected
program.

LEN

3-15

Natural log

LOG( )

3-11

Read the last valid memory address.

MTOP

3-16

One’s complement

NOT( )

3-9

PI-3.1415926

PI

3-10

Random number

RND

3-11

Sign

SGN

3-10

Return the sine of the argument

SIN( )

3-8

Square Root

SQR( )

3-10

Return the tangent of the argument.

TAN( )

3-8

Retrieve and/or assign the free running clock value.

TIME

3-17

Retrieve or assign data to or from the external data memory of
the module.

XBY( )

3-17

Addition

+

3-3

Division

/

3-4

Exponentiation

**

3-4

Multiplication

*

3-4

Subtraction

-

3-4

Logical AND

.AND.

3-6

Logical OR

.OR.

3-6

Advertising