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: Tue, 20 Jul 93 07:57:08 CDT From: crispen@eight-ball.boeing.com (Bob Crispen) Subject: Re: Forcing default representations Message-ID: <9307201257.AA00575@eight-ball.boeing.com> List-Id: Adam Beneschan queries the legality of the following: > type One_Byte is range 0..7; > type Four_Bytes is range 0..31; > for Landing_Gear_Parameters use > record > Position at 0 range Four_Bytes; > State at 4 range One_Byte; > end record; and another correspondent who hasn't given me permission to quote him says that his Alsys Ada compiler won't compile the code above, while all 3 of my VADS compilers (of different vintages, and for different targets) will. What I had in mind of course was analogous to the universal practice: type Colors is (Mauve, Puce, Ultraviolet); for Each_Color in Colors loop "in Colors" being shorthand for "in Colors'first..Colors'last". I believe every Ada compiler accepts this, but I can't find the LRM entry that says where it has to. Probably right under my nose. So, here's the question -- whose compiler has the bug in it? Or have I, in my quest to write portable code, ended up writing non-portable code? If you pick the latter, please say why! +-------------------------------+--------------------------------------+ | Bob Crispen | Who will babysit the babysitters? | | crispen@foxy.boeing.com +--------------------------------------+ | (205) 461-3296 |Opinions expressed here are mine alone| +-------------------------------+--------------------------------------+