A declaration_block is where variables, arrays and constants are declared. declaration_blocks can appear before the main…endmain section in which case it declares global variables and constants, or it can appear as a statement anywhere inside a statement_block in which case the variables and constants are local to the function in which they are declared. They can also appear in a function_block in which case they are local to the source file in which there appear (from the point of declaration to the end of the current source file).
The syntax of a declaration_block is as follows:
{dec}
var identifier : <length> {, var identifier : <length> {,…}} ;
int identifier {, identifier {, … } } ;
var identifier [ <start_offs> .. <end_offs> ] : <length> {, identifier [ <start_offs> .. <end_offs> ] : <length> {, ... } } ;
int identifier [ <start_offs> .. <end_offs> ] {, identifier [ <start_offs> .. <end_offs> ] {, ... } } ;
const identifier = <value> {, const identifier = <value> {,…} } ;
…
{enddec}