From: <[EMAIL PROTECTED]>
Subject: UIntxx question


> I have a question: whats the difference between a UInt16, 32, or 8? If a
> function needs or returns a UInt16, for instance, can I just define it as
a
> UInt? (i.e.-

UInt32  is 32 bits == 4 bytes
UInt16  is 16 bits == 2 bytes
UInt8  is 8 bits == 1 byte

Use the size you need to hold the data you want.  If a function returns a
UInt16 and you use another data type, then that data type may not have
enough room to store all the bits.  And if you pass in something of the
wrong size to a function, how will the function know how to interpret the
bits that are on the stack?  Conclusion: check function prototypes in the
Palm OS Reference and always use the correct data types.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to