www.delorie.com/archives/browse.cgi | search |
Message-ID: | <3747A431.534DD67C@softhome.net> |
From: | Chris Mears <chris_mears AT SoftHome DOT net> |
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> |
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. > <snip bit about using 3 unsigned chars> 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |