From: Miguel Guerreiro 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 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 > 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!