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: Thu, 22 Jul 93 13:34:22 CDT From: crispen@eight-ball.boeing.com (Bob Crispen) Subject: Re: Forcing default representations Message-ID: <9307221834.AA03070@eight-ball.boeing.com> List-Id: Tucker Taft sez: >For discrete types, using the type as an index type for an >array type is a forcing occurrence. Yup. I did use it as an index elsewhere, but I thought it was the thing I gave in my example. No compiler bug. Thanks for the clarification, and I appreciate the trouble. I certainly understand why the internal values of an enumeration are frozen when it's used as an index, but not quite sure why its size is frozen if the array type is constrained. Oh, well. By the way, here's a semi-trivial question: Does anyone know of a real Ada compiler that doesn't assign internal values of integers (forget the size for a minute) beginning with zero as a default for enumerations? I know you can't rely on it, but is there actually a compiler or a machine that doesn't do it the obvious way? It's a pity that we have to put some rep specs in the public part, since in our case the interface type declarations and object declarations form the IDD for our program. We could take a pair of scissors to those source code listings at the word "private" with a clear conscience and have one hell of a readable document. And, definitely non-trivially, can someone explain why some compilers approve of (and even generate proper code for) the following: type Four_Bytes is range 0..31; ... for X use record Y at 0 range Four_Bytes; ... end record; and some don't? +----------------------------+-----------------------------------------+ | Bob Crispen | You guys start coding. I'll go see | | crispen@foxy.boeing.com | what they want. | +----------------------------+-----------------------------------------+