| |||||
Technical Support Support Resources
Product Information | C166: ?C_INITSEC AND ?C_CLRMEMSEC FUNCTIONSInformation in this article applies to:
QUESTIONWhat do the ?C_INITSEC and ?C_CLRMEMSEC functions do? ANSWERThe ?C_INITSEC function initializes the global variables in your program. For example, if you program appears as follows:
unsigned long tens [] = { 1, 10, 100, 1000, 10000 };
unsigned long ten_power (unsigned char i)
{
return (tens[i]);
}
The tens array must be initialized with the values 1, 10, 100, and so on. This is what the ?C_INITSEC function does. The ?C_CLRMEMSEC function clears uninitialized global variables to a value of 0 as defined by ANSI C.
There is no memory restriction for this section. It can reside anywhere in memory. That is also the reason why it does not belong to any memory class. FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Friday, April 16, 2004 | ||||
| |||||