Difference between revisions of "Variables declaration"
(Created page with "DECL/ command is used to declare new variable in ARCO. You must set the variable type, some specification and the name. <code>$$ Declaration of different variable types</code...") |
|||
Line 1: | Line 1: | ||
DECL/ command is used to declare new variable in ARCO. | DECL/ command is used to declare new variable in ARCO. | ||
+ | |||
You must set the variable type, some specification and the name. | You must set the variable type, some specification and the name. | ||
− | <code>$$ Declaration of different variable types</ | + | <code> |
− | + | <span style="color: green; text-decoration: none;">$$ Declaration of different variable types</span> | |
− | + | ||
− | + | DECL/CHAR,80,TCDIRS | |
− | < | + | |
− | + | DECL/INTGR,TCNSLT | |
− | + | ||
− | < | + | |
− | + | <span style="color: green; text-decoration: none;">$$ It is possible to declare different variables of the same type in the same row</span> | |
− | + | ||
− | < | + | DECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZ |
− | + | ||
+ | |||
+ | <span style="color: green; text-decoration: none;">$$ Declaration of an array of 10 char, called result. Each char has 80 characters.</span> | ||
+ | |||
+ | DECL/CHAR,80,RESULTS[10] | ||
+ | |||
+ | <span style="color: green; text-decoration: none;">$$ Declaration of an array of 10 x 5 char</span> | ||
+ | |||
+ | DECL/CHAR,80,RESULTS[10,5] | ||
+ | |||
+ | </code> | ||
Revision as of 14:56, 2 August 2016
DECL/ command is used to declare new variable in ARCO.
You must set the variable type, some specification and the name.
$$ Declaration of different variable types
DECL/CHAR,80,TCDIRS
DECL/INTGR,TCNSLT
$$ It is possible to declare different variables of the same type in the same row
DECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZ
$$ Declaration of an array of 10 char, called result. Each char has 80 characters.
DECL/CHAR,80,RESULTS[10]
$$ Declaration of an array of 10 x 5 char
DECL/CHAR,80,RESULTS[10,5]
By means of the DECL command, you declare variables.
DECL/INTGR,IND
DECL/CHAR,80,RESULTS[10]
DO/IND,1,10,1
RESULTS[IND]=ASSIGN/
ENDDO
You can declare the following types of variables:
BOOL
CHAR
INTGR
REAL
VECTOR
LONG
The variables can be:
COMMON
GLOBAL
LOCAL