User`s manual

26 digi.com Language
4.4 Names
Names identify variables, certain constants, arrays, structures, unions, functions, and abstract data types.
Names must begin with a letter or an underscore (_), and thereafter must be letters, digits, or an under-
score. Names may not contain any other symbols, especially operators. Names are distinct up to 32 charac-
ters, but may be longer. Names may not be the same as any keyword. Names are case-sensitive.
Examples
References to structure and union elements require compound names. The simple names in a compound
name are joined with the dot operator (period).
cursor.loc.x = 10; // set structure element to 10
Use the #define directive to create names for constants. These can be viewed as symbolic constants.
See Section 4.5, “Macros.”
The term READ_ABS is the same as 10 + 0 or 10, and READ_REL is the same as 10 + 1 or 11. Note that
Dynamic C does not allow anything to be assigned to a constant expression.
READ_ABS = 27; // produces a compiler error
To accomplish the above statement, do the following:
#undef READ_ABS
#define READ_ABS 27
my_function // ok
_block // ok
test32 // ok
jumper- // not ok, uses a minus sign
3270type // not ok, begins with digit
Cleanup_the_data_now // These names are not distinct in Dynamic C 6.19
Cleanup_the_data_later // but are distinct in all later versions.
#define READ 10
#define WRITE 20
#define ABS 0
#define REL 1
#define READ_ABS READ + ABS
#define READ_REL READ + REL