From: Radical NetSurfer Newsgroups: comp.os.msdos.djgpp Subject: Size_Of in DJGPP...Bug? Date: Mon, 05 Jun 2000 02:14:40 -0400 Message-ID: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 216.202.134.212 X-Original-NNTP-Posting-Host: 216.202.134.212 X-Trace: 5 Jun 2000 02:15:42 -0400, 216.202.134.212 Lines: 48 X-Original-NNTP-Posting-Host: 64.31.79.51 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Try this: /* VS.C/EXE A program to list the Size of Various Data Types utilized by the DJGPP C/C++ compiler. This program can be used by other compilers to compare their data-sizes for 32 vs. 16 bit modes. June 5th, 2000 1:30am */ #include #include void main(void) { printf("The size_of a Char is %ld\n", sizeof(char)); printf("The size_of a Short is %ld\n", sizeof(short)); printf("The size_of a Int is %ld\n", sizeof(int)); printf("The size_of a Long is %ld\n", sizeof(long)); printf("The size_of a Float is %ld\n", sizeof(float)); printf("The size_of a Double is %ld\n", sizeof(double)); printf("The size_of a Long Double is %ld\n", sizeof(long double)); // printf("The size_of a Enum is %ld\n", sizeof(enum)); } //Main /* Output: The size_of a Char is 1 The size_of a Short is 2 The size_of a Int is 4 The size_of a Long is 4 The size_of a Float is 4 The size_of a Double is 8 The size_of a Long Double is 12 */ QUESTION: Why is not proper to use 'enum' in Size_of ?? Normally, this is defined as 2-Bytes (=to short or int), but in DJGPP, its a SYNTAX error.... THANKS! //the Radical NetSurfer Kind of Guy// http://members.tripod.com/~RadSurfer/