Variables; Arrays - ABB PGC2000 Operation And Service Manual

Process gas chromatograph
Table of Contents

Advertisement

For exponential form floating point numbers, a fixed point constant is followed by the
letter E and an optionally signed integer with no blanks separating them.
Numbers between 0 and 1.0E ±38 approximately can be represented. Negative values
are indicated with the unary negation operator (-).
Examples of valid floating point constants are:
0.
0.123
-10.123
0.123E3
0.123E-3
Examples of INVALID floating point constants are:
.123
123E14
0.123 E3
String Constants: A string constant is a series of up to 255 characters enclosed in double quotes.

Variables

Variable names and data types can be up to 40 characters (no spaces) and must start with a letter.
Subsequent characters may be letters, digits, or underscore (_) characters. The last character may
be an exclamation mark (!), dollar sign ($), or per cent sign (%) to indicate the data type.
Integer Variables: Integer variables have names that end with the per cent sign (%) or without any
sign. These variables are used to store whole numbers between -32768 and 32767.
Floating Point Variables: These variables have names that end with an exclamation point (!); these
variables can store real numbers between -1.0E ±38 and +1.0E ±38.
String Variables: String variables have names that end with the dollar sign ($) and are used to store
strings of up to 255 characters. Examples of variable declaration:
ABC!
XYZ%
A$
I

Arrays

An array is a collection of scalar variables, all of which have the same data type and variable name.
An individual scalar variable or element of an array is referenced with the use of a subscript.
The DIM statement defines the number of elements or extent of the array. For example, an array with
a dimension of ten has ten elements. A subscript must be in the range from 1 to the number of array
elements. For an array with a dimension of ten, subscripts go from 1 to 10. A subscript of one refers
to the first array element. Usage of an array element before the DIM statement is not allowed.
The COMMON! array is an array of floating point variables shared between all of the BASIC
programs. A reference to a particular element of COMMON! by any of the BASIC programs accesses
the same memory locations in memory. Values can be stored in COMMON! by a BASIC program
2000-OSM, F1
(no leading digit)
(no decimal point)
(embedded blank)
declares a floating point variable
declares an integer variable
declares a string variable
defaults to an integer variable.
10-3

Advertisement

Table of Contents
loading

Table of Contents