Joke, right? Nobody codes like this.
BTW, there is no result that this code returns, if you mean the
side-effect is different, it's probably because long isn't necessarily
guarenteed to be 4 bytes long. Suggest you get yourself a copy of K&R and
Writing Solid Code and read both from cover to cover.
Will
----- Original Message -----
From: "Dragomir Goranov" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, September 20, 2002 6:01 AM
Subject: CharToLong ?
> Hi,
> I have a function which returns different results when compiled with
> MSVC++ and Codewarrior. The function is:
>
> /************************/
>
> static void c2l(unsigned char * *c, unsigned long * l)
> {
> *l = *((long *)*c);
> (*c)+=4;
> }
>
> /************************/
>
> Can anyone tell me why it is so and what should I do to make the
conversion
> return equal results?
>
>
>
> --
> 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/