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,74a56083ffbe573d X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: Zoo question Date: 1996/08/15 Message-ID: <321301EC.2C4D@lmtas.lmco.com>#1/1 X-Deja-AN: 174388119 references: <320F16B6.6944@lmtas.lmco.com> <3210A142.2781E494@escmail.orl.mmc.com> <3211C462.19D9@lmtas.lmco.com> <3212468B.2781E494@escmail.orl.mmc.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; 68K) Date: 1996-08-15T00:00:00+00:00 List-Id: Ted Dennison wrote: > > Ken Garlington wrote: > > > > Ted Dennison wrote: > > > > > > isn't guaranteed to work (assuming "work" means raise an execption within > > > this block when Animal_ID'Succ(Next_Animal) > Animal_ID'last). > > > > Now, the question is: Even though the call to Animal_ID'Succ(Animal_ID'Last) > > won't cause an exception (which I find very counter-intuitive, by the way), > > will an exception be raised on the line that contains that call? > > Maybe, maybe not. I see three valid possibilities - > > 1 - It raises an exception at the assignment. (This is what the code > seems to be assuming) That certainly seems to be one of the options... > > 2 - No exception is ever raised (Constraint checking could be disabled > for any number of reasons). A valid point; for this example, assume that there's no pragma Suppress, compiler switches, or other use actions applied that would disable checking. > > 3 - A CONSTRAINT_ERROR is raised OUTSIDE the block, upon the next attempt > to use the value of Animal_ID. (That's is what I meant by "within this > block" above). Assuming no supresses, would there be a case where #1 would not apply (no exception on assignment)? -- LMTAS - "Our Brand Means Quality"