6.2 Variable declaration

-------------------------

Variables are declared using the following syntax:

variable-type identifier;

where 'variable-type' may be 'char', 'byte', 'int', 'word', 'long',

'dword' or 'float'.

Several identifiers of the same type can be declared at the same time:

variable-type identifier1, identifier2, ... , identifierN;

One-dimensional arrays can be declared as follows:

variable-type identifier[elements];

where 'elements' is a constant expression for the number of variables

of this type combined into the array.

Initialized arrays can be declared without specifying the number of

elements. An array is created based on the actual number of elements.

variable-type identifier[] = { const1, const2 };

At declaration variables can be initialized as follows:

variable-type identifier = value;

Examples of global declarations:

byte i,j; /* declares two variables of type byte named i and j */

word see[10] /* declares array named see, consisting of 10

elements of type word */

int h,x[27] /* declaresa variable of type 'int' named 'h', and an array

named x, consisting of 27 elements of type int */

long size=0; /*declares a variable of type 'long' named 'size', of value 0*/