User`s manual

32 digi.com Language
4.8 Statements
Except for comments, everything in a C program is a statement. Almost all statements end with a semico-
lon. A C program is treated as a stream of characters where line boundaries are (generally) not meaningful.
Any C statement may be written on as many lines as needed. Prior to Dynamic C 9.60, the compiler will
parse up to 250 bytes for any single C statement in a “.c” or a “.lib” file. Starting with Dynamic C 9.60, the
compiler will parse up to 64K bytes for any single C statement in a “.c” file; the 250 byte limit still exists
for “.lib” files.
A statement can be many things. A declaration of variables is a statement. An assignment is a statement. A
while or for loop is a statement. A compound statement is a group of statements enclosed in braces
{ and }. A group of statements may be single statements and/or compound statements.
Comments (the /*...*/ kind) may occur almost anywhere, even in the middle of a statement, as long as
they begin with /* and end with */.
4.9 Declarations
A variable must be declared before it can be used. That means the variable must have a name and a type,
and perhaps its storage class could be specified. If an array is declared, its size must be given. Root data
arrays are limited to a total of 32,767 elements.
If an aggregate type (struct or union) is being declared, its internal structure has to be described as
shown below.
static int thing, array[12]; // static integer variable &
// static integer array
auto float matrix[3][3]; // auto float array with 2 dimensions
char *message="Press any key...” // initialized pointer to char array
struct { // description of structure
char flags;
struct { // a nested structure here
int x;
int y;
} loc;
} cursor;
...
int a;
a = cursor.loc.x; // use of structure element here