29
This section describes commands that are not confined to any specific hardware features.
ABS
Purpose To return the absolute value of a numeric expression.
Syntax A = ABS(N)
“A”
is a numeric variable to be assigned to the absolute value of a numeric
expression.
“N” is a numeric expression; it can be an integer or a real number.
Example
TimeDifference% = ABS(Time1% - Time2%)
BIT_OPERATOR
Purpose To perform bit-wise operations of integers or long integers.
Syntax C = BIT_OPERATOR(operator%, A, B)
Remarks “C” is an integer (C%) or long integer variable (C&
result.
“operator%” is an integer variable, indicating the bit-wise operator. (see below)
“A” is an integer (A%) or long integer (A&) variable, indicating the 1
st
operand.
“B” is an integer (B%) or long integer (B&) variable, indicating the 2
nd
operand.
1
2
3
bit-wise AND
bit-wise OR
bit-wise XOR
Example
Result& = BIT_OPERATOR(2, 1100, 1000)
DIM
Purpose
To specify the maximum value of variable subscripts and to allocate storage
accordingly.
Syntax DIM Array (range {,range}) {, Array(range {,range})}
Remarks “Array” is an array variable.
“range” can be an integer or an integer expression.
The DIM statement sets all the elements of the specified arrays to an initial
value of zero or empty string.
Note that the maximum allowable number of dimensions for an array is 2.
Example
DIM A(10), B%(20), C$(30, 10)