Supported a-b vbasic keywords – Rockwell Automation 2708-NBD VBASIC Language Development Kit User Manual

Page 50

Advertising
background image

A-B VBASIC and Visual BASIC

Appendix B

Differences Between

B–2

b. # suffix on variables

c. Floating–point constants with 8 or more significant digits

d. AS DOUBLE clauses

e. Functions involving DOUBLE, such as CVD and MKD

9. Restriction on the exponentiation operator

Exponentiation is implemented by repetitive multiplication, so small
exponents are recommended. Full real exponentiation is provided in the
function called “Power!” in the BASIC source file MATH.BAS. A-B
VBASIC supports exponentiation to positive integer powers only. For
example:

SUPPORTED: X^2

NOT SUPPORTED : X^5.7 or X^–2

10.Unsupported math intrinsics

These intrinsic functions, relating to exponent and trigonometric functions
are not implemented in the interpreter running in the DH5 terminal, but
BASIC source code implementing all of the below is provided in the file
MATH.BAS and may be copied into programs as required:

ATN COS EXP LOG SIN SQR TAN

ABS(numeric–expression)

Returns the absolute value of a numeric expression. ABS(–1) and ABS(1)
are both 1.

ASC(string–expression)

Returns the ASCII value of the first character in string–expression

BEEP

Sounds the speaker. Produces the same sound as PRINT CHR$(7).

CDBL(numeric–expression)

No longer supported. Converts a numeric–expression to a double–precision
number. Note the restrictions on DOUBLE precision usage above.

CHAIN filespec

Transfers control from current program to another program residing in file
memory. COMMON is NOT supported. Therefore, all variables are lost
between the CHAIN unless first stored in a file and retrieved after the
CHAINing.

Supported A-B VBASIC
Keywords

Advertising