Difference between revisions of "Variables declaration"
From ArcoWiki
| Line 1: | Line 1: | ||
| − | DECL/ command is | + | In order to perform a ''Variable Declaration'' it is necessary to use the <code>DECL</code> command.<br /> |
| + | With that command it is specified the variable type and its name. | ||
| − | + | <code><span style="color: green; text-decoration: none;">$$ Declaration of different variable types</span><br /></code> | |
| + | ::<code>DECL/CHAR,80,TCDIRS<br /></code> | ||
| + | ::<code>DECL/INTGR,TCNSLT<br /></code> | ||
| − | |||
| − | |||
| − | DECL/ | + | <code><span style="color: green; text-decoration: none;">$$ It is possible to declare different variables of the same type in the same row</span></code> |
| + | ::<code>DECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZ<br /></code> | ||
| − | |||
| + | <code><span style="color: green; text-decoration: none;">$$ Declaration of an array of 10 char, called result. Each char has 80 characters.</span><br /></code> | ||
| + | ::<code>DECL/CHAR,80,RESULTS[10]<br /></code> | ||
| − | |||
| − | DECL/ | + | <code><span style="color: green; text-decoration: none;">$$ Declaration of an array of 10 x 5 char</span><br /></code> |
| + | ::<code>DECL/CHAR,80,RESULTS[10,5]<br/></code> | ||
| − | < | + | You can declare the following types of variables:<br/> |
| + | ::<code>BOOL<br/></code> | ||
| + | ::<code>CHAR<br/></code> | ||
| + | ::<code>INTGR<br/></code> | ||
| + | ::<code>REAL<br/></code> | ||
| + | ::<code>VECTOR<br/></code> | ||
| + | ::<code>LONG<br/></code> | ||
| − | |||
| − | < | + | The variables can be:<br/> |
| − | + | ::<code>COMMON<br/></code> | |
| − | + | ::<code>GLOBAL<br/></code> | |
| − | + | ::<code>LOCAL<br/></code> | |
| − | < | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | LOCAL | ||
Revision as of 15:20, 2 August 2016
In order to perform a Variable Declaration it is necessary to use the DECL command.
With that command it is specified the variable type and its name.
$$ Declaration of different variable types
DECL/CHAR,80,TCDIRSDECL/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]
You can declare the following types of variables:
BOOLCHARINTGRREALVECTORLONG
The variables can be:
COMMONGLOBALLOCAL