Message-ID: <3747A431.534DD67C@softhome.net> From: Chris Mears X-Mailer: Mozilla 4.04 [en] (Win95; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: typedef'ing a 24-bit integer References: <37459ABF DOT FF51CA41 AT aaual DOT ualg DOT pt> <374601DE DOT 630CEA74 AT cartsys DOT com> <3746C254 DOT 523D AT erols DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 Date: Sun, 23 May 1999 16:46:09 +1000 NNTP-Posting-Host: 139.134.193.201 X-Trace: newsfeeds.bigpond.com 927441508 139.134.193.201 (Sun, 23 May 1999 16:38:28 EST) NNTP-Posting-Date: Sun, 23 May 1999 16:38:28 EST Organization: Telstra BigPond Internet Services (http://www.bigpond.com) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com John S. Fine wrote: > > Nate Eldredge wrote: > > > > Miguel Guerreiro wrote: > > > > > > How can you do somethin kinda like this: > > > > > > typedef int24 (24-bit integer) > > > typedef uint24 (24-bit unsigned int) > > > > > > I want it to take *exactly* 24-bit of space > > > > You can't. > > > > Why do you want to do this? > > "can't" is a bit strong; But it certainly takes some very > ugly kludges. > Clever, but who says a char is 8 bit? The standard says it must be at *least* 8 bit, but it could be 47 bit for all we know. Of course, this is only important if you want to make a _portable_ program. Chris > -- > http://www.erols.com/johnfine/ > http://www.geocities.com/SiliconValley/Peaks/8600/