From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 13 Dec 91 15:23:40 GMT From: agate!spool.mu.edu!yale.edu!qt.cs.utexas.edu!zaphod.mps.ohio-state.edu!ca en!uvaarpa!software.org!smithd@ucbvax.Berkeley.EDU (Doug Smith) Subject: Re: 'SIZE attribute of a type Message-ID: <1991Dec13.152340.20444@software.org> List-Id: Well, now for the twist. If I have understood this thread, the following statement should minimize the storage for variables of type b: for b'Size use b'Size; So I used a Verdix compiler (old) to see if it would even compile the code--it does! But for a Boolean type it still uses 8: Domain/Ada Version 3.0.2 - March 23, 1990 Type B has size 8 Variables of type B have size 8 How many compilers can compile this and then how many actually use one bit for this type? Very interesting...but cryptic. ----------------Cut Here----------------------------------- with Text_IO; procedure Test_B is type B is new Boolean; for B'Size use B'Size; B_variable : B; begin Text_IO.Put_Line ("Type B has size " & Integer'Image (B'Size)); Text_IO.Put_Line ("Variables of type B have size" & Integer'Image (B_variable'Size)); end Test_B; ----------------Cut Here-----------------------------------