
Chapter 8 PAC Language Syntax
8-7
[ 2 ] Type Declaration Instruction
The following type declaration commands can be used to declare the variable
type.
Type Declaration Instructions
Type Command Example
Integer type DEFINT DEFINT AA, AB
Single precision real
type
DEFSNG DEFSNG BA, BB
Double precision real
type
DEFDBL DEFDBL CA, CB
Character string type DEFSTR DEFSTR DA, DB
Vector type DEFVEC DEFVEC EA, EB
Position type DEFPOS DEFPOS FA, FB
Joint type DEFJNT DEFJNT GA, GB
Homogeneous
transformation type
DEFTRN DEFTRN HA, HB
In these commands a variable can be initialized together with type declaration.
In a declaration statement using these commands, a postposition cannot be
added to a variable name.
Example:
DEFINT AA = 1 'Assigns 1 to AA as an integer type.
DEFSNG BB (10) 'Sets BB to a single precision real
type 'of which number of elements is
10.
Bad example:
DEFINT AB% 'An error occurs because a
'postposition is used.
Komentarze do niniejszej Instrukcji