Difference between revisions of "Variables declaration"

From ArcoWiki
Jump to: navigation, search
(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>
+
<code>
<code>DECL/CHAR,80,TCDIRS</code>
+
<span style="color: green; text-decoration: none;">$$ Declaration of different variable types</span>
<code>DECL/INTGR,TCNSLT</code>
+
 
<code></code>
+
DECL/CHAR,80,TCDIRS
<code>$$ It is possible to declare different variables of the same type in the same row</code>
+
 
<code>DECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZ</code>
+
DECL/INTGR,TCNSLT
<code></code>
+
 
<code>$$ Declaration of an array of 10 char, called result. Each char has 80 characters.</code>
+
 
<code>DECL/CHAR,80,RESULTS[10]</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>
+
 
<code>$$ Declaration of an array of 10 x 5 char</code>
+
DECL/DOUBLE,TCDIFX,TCDIFY,TCDIFZ
<code>DECL/CHAR,80,RESULTS[10,5]</code>
+
 
 +
 
 +
<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