delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/03/03/21:30:25.1

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Trace-PostClient-IP: 68.147.131.211
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT Invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 16 bit integers
Organization: Systematic Software
Message-ID: <cb4d40heu3im67bp7scs0gcvfkh9ekd81v@4ax.com>
References: <baec0bf0 DOT 0403012323 DOT 10896c3 AT posting DOT google DOT com> <esd840d8dde7matafu4vd11bsvagshadkl AT 4ax DOT com> <baec0bf0 DOT 0403020529 DOT 8f42598 AT posting DOT google DOT com> <Xk01c.25898$aZ3 DOT 23018 AT fed1read04>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Lines: 26
Date: Thu, 04 Mar 2004 02:17:02 GMT
NNTP-Posting-Host: 24.71.223.147
X-Complaints-To: abuse AT shaw DOT ca
X-Trace: pd7tw3no 1078366622 24.71.223.147 (Wed, 03 Mar 2004 19:17:02 MST)
NNTP-Posting-Date: Wed, 03 Mar 2004 19:17:02 MST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Tue, 2 Mar 2004 05:55:02 -0800 in comp.os.msdos.djgpp, "Dave
Bloodgood" <dabldgd AT cox DOT net> wrote:

>"Andrey" <huli_ebtyt AT list DOT ru> wrote in message
>news:baec0bf0 DOT 0403020529 DOT 8f42598 AT posting DOT google DOT com...
>> And what if I want to process an array of 16-bit data loaded from a file,
>> should I use?:
>>
>> a = *(pointer)&0x0000ffff;
>> b = *(pointer)>>16;
>> ...
>> work with a, b
>> ...
>>
>> I think it is not optimal...

>Use "short"'s instead of Int ( which are really long ). They can be signed
>or unsigned, and are guaranteed to be 16 bits

... at least 16 bits! 

-- 
Thanks. Take care, Brian Inglis 	Calgary, Alberta, Canada

Brian DOT Inglis AT CSi DOT com 	(Brian dot Inglis at SystematicSw dot ab dot ca)
    fake address		use address above to reply

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019