>  i would normally pass 'XX22' which is an int.  how do i convert
>the string into the ' ' format?

Here's one possible way. Code courtesy of Ray Rischpater.

Regards,
Steve Mann

# # #

/***********************************************************************
  * FUNCTION:           StringToQuad
  *
  * DESCRIPTION:        This routine converts a string to a four-byte quad.
  *
  * RETURNED:           nothing
  ***********************************************************************/
void StringToQuad
(
UInt32* quad,           // ( in/out ) quad to contain the results
Char *  str             // ( in ) string to convert
)
{
        struct converter { char a, b, c, d; } *c;

        c = ( struct converter * ) quad;

        c->a = str [ 0 ];
        c->b = str [ 1 ];
        c->c = str [ 2 ];
        c->d = str [ 3 ];

        return;
}

-- 
-------------------------------------------
Creative Digital Publishing Inc.
1315 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.784.9461              805.784.9462 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com

-- 
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