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: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,df854b5838c3e14 X-Google-Attributes: gid103376,public From: austern@isolde.mti.sgi.com (Matt Austern) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/02/26 Message-ID: #1/1 X-Deja-AN: 141246185 references: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> organization: SGI reply-to: austern@mti.sgi.com newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-02-26T00:00:00+00:00 List-Id: In article <312FDB27.4B83@inav.net> JR Crosmer writes: > > >(4) C++ in particular has been changing very rapidly. It seems as if every > > > time I turn around there is a new keyword. > > What is the status of the plain/ordinary/but very noticably forgotten boolean? > > It seems that the biggest difficutly that run into is that everybody needs/wants to > declare a new version (and they are not all compatible!). Because C/C++ were never > polite enough to provide it to begin with (0 or non-zero is hardly a good substitute) > we end up either creating the (ITEM, NON_ITEM) form, create yet another version > (my latest is BooleaN, { FalsE, TruE } ). I think I remember something about > BOOL in one of the C or C++ stds. Which compilers use it? (Borland does not, > at least thru 4.0). C does not have a boolean type, but C++ does. It was added precisely because every language was defining its own boolean type: it was clear that a standard boolean type was needed for the sake of avoiding name clashes. The C++ boolean type is called bool, and its two permissible values are the manifest constants true and false. For the sake of compatibility with old code, there are standard conversions from bool to int and from int to bool. -- Matt Austern SGI: MTI Compilers Group austern@isolde.mti.sgi.com