My C is a bit rusty (my primary experience is Cobol based) .... I was
wondering if anyone can help me out here.  I have a data string that I want
to move into individual fields of a structure...   How can I do this?

    Also, how do I define the field in my structure if I want a numeric
field with 2 decimal places assumed.  I have a discount field that would be
coming from str1 as 0200 (last four characters).  I want this field defined
as numeric with 2 decimals assumed (I know Disc Percent in my structure is
incorrect).


Char str1[78] = "A1111122222Company Name                  Address Field
Y030200"

struct CustomerFF
{
      Char Action[1];
      Char CustNo [5];
      Char CustLoc[5];
      Char CustName[30];
      Char Addr[30];
      Char AuthF[1];
      Char PriceNo[2];
      Char DiscPct[4];  ?????
} CustomerFF;


Thanks so much!
     Chris



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

Reply via email to