www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/31/08:40:27

From: Miguel Guerreiro <a14616 AT aaual DOT ualg DOT pt>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: typedef'ing a 24-bit integer
Date: Mon, 31 May 1999 11:07:22 +0100
Organization: Servico de News da Universidade do Algarve
Lines: 31
Message-ID: <37525F5A.9CC35DF1@aaual.ualg.pt>
References: <37459ABF DOT FF51CA41 AT aaual DOT ualg DOT pt> <374C2C34 DOT F91FB02 AT aaual DOT ualg DOT pt> <374e4a23 DOT 1353984 AT noticias DOT iies DOT es>
NNTP-Posting-Host: 10.11.85.128
Mime-Version: 1.0
X-Mailer: Mozilla 4.07 [en] (WinNT; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Guillermo Rodriguez Garcia wrote:

> El día Wed, 26 May 1999 18:15:32 +0100, Miguel Guerreiro
> <a14616 AT aaual DOT ualg DOT pt> escribió:
>
> >What about other languages?...
> >
> >I think that in pascal you can do something like this:
> >
> >    type
> >        uint24 = $0..$FFFFFF
> >    end
>
> But that doesn't mean that a uint24 variable will take three bytes,
> just that the compiler will (try to) check the values you assign to an
> uint24. It will probably still use four bytes to store it, at least in
> 32-bit machines.
>
> Regards:
> GUILLE
> ----
> Guillermo Rodriguez Garcia
> XXguille AT XXiies DOT XXes (ya sabes :-)

Perhaps I didn't make myself clear, I only want it to take three bytes
when I save it to disk ( maybe packed ) not while I'm working with it...

Thanks to all those who have helped me!

- Raw text -


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