From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: bruce@shell.co.nz (Bruce Clement) Subject: If your only tool is a hammer, all your problems look like nails (was Re: C is 'better' than Ada because...) Date: 1996/07/03 Message-ID: #1/1 X-Deja-AN: 163379893 references: <4q8fbo$701@red.interact.net.au> organization: Shell New Zealand Limited reply-to: frey@alfheim.actrix.gen.nz newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-03T00:00:00+00:00 List-Id: In djohnson@tartarus.ucsd.edu (Darin Johnson) writes: ... >This just means you can't find an existing one, not that it's >impossible. Have you tried writing it yourself? If you have problems >with it in Ada, I bet you also have problems with it in standard C >(ie, you can't tell how many bits are in a byte, or other binary >format details). #include #include int main(void) { printf("According to the preprocessor symbol CHAR_BIT " "defined in clause 5.2.4.2.1\nthere are %u \"bits " "for smallest object that is not a bit-field (byte)\"\n", (unsigned)CHAR_BIT); return 0; } -- Not speaking for my employers -- Bruce Clement bruce@shell.co.nz X.400: c=NZ;a=SYNET;p=SHELL;o=SNZ_WELLINGTON; ou1=ICDI;ou2=MSMAIL;S=CLEMENT;g=BRUCE;i=BI