App.g-3, App.g, Array variables – Yokogawa GC8000 Process Gas Chromatograph User Manual

Page 502: Reserved variables, 6 operations

Advertising
background image

<Appendix G User Program>

App.G-3

IM 11B08A01-01E

DEFDBL: D

Up to 1024 numeric variables can be used (including reserved variables).

Array Variables

Array variables are declared in DIM statements. One-dimensional arrays and two-dimensional

arrays can be used.
One hundred array variables can be used in one script fi le.
One-dimensional arrays and two-dimensional arrays have up to 1024 elements each.
Variable names that have been used as simple variables cannot be declared in the DIM

statements as array names.
An array name that has been declared cannot also be declared again in the DIM statement.
When an array is declared, all the elements of the array are set to zero.
Arrays are required to be declared in DIM statements (declarations cannot be made implicitly).

One-dimensional array format:

Array name (X)

Two-dimensional array format:

Array name (X) (Y)

Array defi

nition:

DIM

Array

name

(X)

AS

TYPE

DIM

Array

name

(X)

(Y)

AS

TYPE

X,

Y:

Array

size

–1

TYPE: INTEGER,

REAL,

DOUBLE

Example:

One-dimensional array statement:

DIM RS (4) AS REAL

Element:

RS (O), RS (l), RS (2), RS (3), RS (4)

Two-dimensional array statement:

DIM IS (2) (3) AS INTEGER

Element:

IS (0) (0)

IS (0) (1)

IS (0) (2)

IS (0) (3)

IS (1) (0)

IS (1) (1)

IS (1) (2)

IS (1) (3)

IS (2) (0)

IS (2) (1)

IS (2) (2)

IS (2) (3)

Reserved Variables

Reserved variables are variables that are reserved by the system.
User cannot use the variable name in Table 1 as a variable name defi ned by DEFINT, etc.

Table 1 List of reserved variables

Variable Name

Data Type

Range

Function

DATE

Integer

1 to 31

Saves the date of the current time setting.

HOUR

Integer

0 to 23

Saves the hour of the current time setting.

MIN

Integer

0 to 59

Saves the minute of the current time setting.

1.6 Operations

Table 2 shows the categories of arithmetic operation, relational operation and logical operation

and the precedence order of operations.

Table 2 Precedence Order of Operations

Item

Symbol (Operator)

Precedence Order

Operation in parenthesis

( )

High

Unary operation

+, –, NOT

Exponentiation

^

Multiplication & division

*, /

Addition & subtraction

+, –

Relational operation

=, <, >, >=, <=, <>

Logical operation

AND

Logical operation

OR, EXOR

Low

2nd Edition : May 11, 2012-00

App.G

Advertising