Usually packing and unpacking a structure implies removing extra spaces so the data size is as small as possible. There is no extra space in a float to remove. All the bits are used to represent the number. So I would leave the float alone and just pack the strings in your structure. So yes, you can use the float in your structure. Just store it as is. However, it sounds like you may be converting the float to a string first. Is this the case? I'm not too sure what you mean by specifying the number of decimal points in your float. You cannot control the number decimal places in such a number unless you first convert it to another format. Some more information may be helpful.
----- Original Message ----- From: "Mahesh Salian" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Tuesday, April 23, 2002 1:37 AM Subject: Floating point problem > Hi > > I am using Code warrior IDE with C compiler. > Can i use float in the data structure . Is it possible to pack and unpack > this structure if i use float. > The flat files which i sync with my application hv the decimal digits (for > eg. Price = 10.55 ). Can anybody suggest how could i capture this decimal > numbers in my structure and also able to pack it. > > TIA, > Mahesh > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
