Date: Tue, 9 May 2000 11:38:42 +0200 (MET DST) From: pad2369 Message-Id: <200005090938.LAA11639@maggiore.iperbole.bologna.it> To: djgpp AT delorie DOT com, Jared Stevens References: <00050815311200 DOT 09858 AT sparky DOT lineo DOT com> In-Reply-To: <00050815311200.09858@sparky.lineo.com> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP3 Imap webMail Program 2.0.11 Sender: pad2369 AT iperbole DOT bologna DOT it Subject: Re: Datatype sizes Reply-To: djgpp AT delorie DOT com Jared Stevens : > Hello - > In DJGPP, since it's a 32-bit compiler, when I make a > variable of type > char, > does it store that variable in a 32-bit slot in > memory, or an 8-bit slot? I > heard somewhere that when you make a variable if it > is smaller than 32 > bits, it > will store it in a 32 bit slot. If it does do this, > is there a way to make > it > store a char in an 8-bit slot and an int in a 16 bit > slot? AFAIK It is possible to use the minimal storage only when dealing with fields in struct's. You can use the "#pragma pack(1)" directive or use "__attribute((packed))__" when declaring such structs. Look at FAQ 22.11 for more details on this topic. BTW, be warned that since gcc is a 32 bit compiler the size of an integer is not 16 bit, but 32. If you need 16 bit integers you have to use "short int". ciao Giacomo ------------------------------------------------------ Giacomo Degli Esposti - pad2369 AT iperbole DOT bologna DOT it