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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5697899e4423465c X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Boolean Representation Date: 1998/09/26 Message-ID: #1/1 X-Deja-AN: 395066539 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-09-26T00:00:00+00:00 List-Id: Keith Thompson (kst@king.cts.com) wrote: : ... : Here's another interesting question. Suppose some perverse : implementation used an internal representation of (False => 1, True => 0) : for type Boolean, and generated extra code to make all the predefined : operations work properly. A packed array of 32 Booleans, for example, : would occupy 32 bits, but setting it to (others => True) would clear : all 32 bits. I'm not suggesting that this would ever be a good idea, : but would it actually violate the RM? It is just this kind of thinking which led people to put "reconfirming" representation clauses on enumeration types in Ada 83. What a waste of energy! We added a rule in Ada 95 to save the paranoid from writing all those silly enumeration representation clauses. I can see we should have gone one step further, specifying the representation for 1-bit boolean objects. Groan. Please paranoid readers, don't go worrying about the possibility of 1-bit boolean objects having False = 1. Instead, let's all agree to shun any Ada compiler which makes such an absurd choice... That's ultimately much more effective than any words in a standard. : -- : Keith Thompson (The_Other_Keith) kst@cts.com <*> : Qualcomm, San Diego, California, USA -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA An AverStar Company