User`s manual

Dynamic C Users Manual digi.com 13
2.2.2 Dynamic C Differences
The main differences in Dynamic C are summarized in the list below and discussed in detail in Chapter 4.
“Language” and Chapter 12. “Keywords”.
If a variable is explicitly initialized in a declaration (e.g., int x = 0;), it is stored in flash memory
(EEPROM) and cannot be changed by an assignment statement. Such a declaration will generate a
warning that may be suppressed using the const keyword:
const int x = 0
To initialize static variables in Static RAM (SRAM) use #GLOBAL_INIT sections. Note that other C
compilers will automatically initialize all static variables to zero that are not explicitly initialized before
entering the main function. Dynamic C programs do not do this because in an embedded system you
may wish to preserve the data in battery-backed RAM on reset
The numerous include files found in typical C programs are not used because Dynamic C has a library
system that automatically provides function prototypes and similar header information to the compiler
before the users program is compiled. This is done via the #use directive. This is an important topic
for users who are writing their own libraries. Those users should refer to Section 4.23, “Modules” for
more information.
When declaring pointers to functions, arguments should not be used in the declaration. Arguments may
be used when calling functions indirectly via pointer, but the compiler will not check the argument list
in the call for correctness. See Section 4.16 for more information
Bit fields are not supported.
Separate compilation of different parts of the program is not supported or needed.