Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 30

Advertising
background image

4Ć10

4.2.3

Real Constants

A real constant is a number with a decimal point. For large numbers,

use scientific notation in the following general format: a sign, digits,

a decimal point, digits, an E," a sign, and digits. Take, for example,

the following real constant example:
-1234.5678E+11
The E" is a real constant which means times ten to the" followed

by the power" or exponent. In the real constant 34.99876E+07, the

E" means times ten to the 7th. There must always be a number in

front of the E" when the E" is used (E+13 by itself is illegal.). Only

8 digits of significance are used to store the number. The total

number of digits on the left and right side of the decimal point must

be less than or equal to 8.
As with the real variable, the real constant can have a value in the

range:
9.2233717 x 10

18

> positive value > 5.4210107 x 10

-20

-9.2233717 x 10

18

< negative value <-2.7105054 x 10

-20

All of the values listed below represent the number one hundred

twenty:
120

ă0000120.00

+.120E+03

120.

1200000.00EĆ0004

0.000120E6

+120.

ă120E3

1200000EĆ4

4.2.4

String Constants

String constants are sequences of alphanumeric and other printable

characters. Line terminators (<CR>) are not allowed. String

constants must be enclosed either in single or double quotes. If one

type of quotes is used in the sequence itself, the other type must be

used to enclose the sequence. String constants may be up to 132

characters long.
A BASIC string prints every character between quotation marks

exactly as you type it into the source program. This includes the

following:
1. Letters (A-Z)
2. Leading, trailing, and embedded spaces
3. Tabs
4. Special characters (\, ?, !, etc.)
Note, however, that the actual BASIC string does not contain the

delimiting quotation marks.
The following are valid string constants:

THIS IS A STRING CONSTANT."
SO IS THIS."
THIS IS A MESSAGE!*/??"
HERE IS A `QUOTE' FROM SOMEONE'" (Note the embedded

single quote.)
`HE SAID GOODBYE" TODAY' (Note the embedded double

quotes.)

Advertising
This manual is related to the following products: