char will always be 1-byte. I will -assume- that WChar will always be two-byte (int16). However ... Char -could- be #def'd to be char or WChar depending upon selected options.
Well ... it could if the Palm API were implemented in libraries. Since they are in traps, then Char is essentially locked in as a char. -- -Richard M. Hartman [EMAIL PROTECTED] 186,000 mi/sec: not just a good idea, it's the LAW! McMicken, Steven wrote in message <[EMAIL PROTECTED]>... > >PalmTypes.h defines Char as type char so there is no difference in their >use. For localization, I believe you should use type WChar, which is >defined as UInt16 (or unsigned short). > >I studiously tried to use all of the "proper" Palm types before the release >of OS 3.5. After that blew most of my declarations out of the water, I am >now somewhat studiously trying to use standard C types, since those won't >change. PalmCompatibility.h helped in making the change, though! > >Regards, > >Steve > >-----Original Message----- >From: Scott Johnson [mailto:[EMAIL PROTECTED] >Sent: Tuesday, July 11, 2000 2:55 PM >To: Palm Developer Forum >Subject: Re: StrIToA > > >"McMicken, Steven" wrote: >> Before using the pointer, you must allocate space for the string using >> MemPtrNew (LengthOfStringPlusOne) or by setting the pointer equal to a >> character array name, such as, >> char str[5]; >> CharPtr s = str; > >Shouldn't you use "Char str[5]" instead? I'm still confused about how >Palm handles characters, but I think that in some locales, a character >is more than one byte. To be fully portable, I think you need to >declare all strings as type "Char" and when allocating space use >MemPtrNew((strlen+1)*sizeof(Char)) (or MemHandleNew). Note that all >string manager functions expect type "Char" not "char". > >Cheers, >--Scott > >-- >For information on using the Palm Developer Forums, or to unsubscribe, >please see http://www.palmos.com/dev/tech/support/forums/ > > -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
