assuming you have a UINT16 called fred you can simply do :
hibyte = fred >> 8;
as you will shift in zeros.
to be more carefull you could do:
hibyte = (fred >> 8) & 0xFF;
if you has a UInt16 call fred2 then you do this
hibyte = fred2 >> 24 or again to be carfull:
hibyte = (fred2 >> 24) & 0xFF.
above asumes hibyte is a UInt8.
The same applies for signed numbers.
Rik
> -----Original Message-----
> From: Essell [SMTP:[EMAIL PROTECTED]]
> Sent: 12 July 2001 00:25
> To: Palm Developer Forum
> Subject: Re: HIBYTE in Palm C ?
>
> could u please show me how this is done .. i'm kinda new at this ..
>
> thanks a lot ..
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/