How to init variables in sampleLib ? Is it related to wrong CW settings?
Please look at the code below. Why intxxx, intyyy, gdate, spxxx, spyyy,
and ddd cannot be initialized? The constants assigned to the Global
Varaibles are not included to the prc file. The constants assigned to
the local variables are appended to the end of file? But not init?
I am building a library (code resource, type = 'libr' rsc_id=0).
DateType gdate={110,2,23};
Int16 intxxx = 110;
Char spxxx[] = {"abcdefgh"};
Err SampleLibOpen(UInt16 refNum, UInt32 * clientContextP)
{
SampleLibGlobalsPtr gP;
Err err = 0;
Int16 originalOpenCount = 0;
Int16 intyyy=110;
Char spyyy[] = {"uvxyz"};
DateType ddd={110,2,23};
gdate.year++;
intxxx++;
// Error-check our parameters
ErrFatalDisplayIf(clientContextP == NULL, "null context variable
pointer");
ddd.year = 110;
ddd.month = 2;
ddd.day = 23;
......
}
Martin
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
- Re: How to init variables in sampleLib Martin NGAI
- Re: How to init variables in sampleLib Ben Combee
