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=0.7 required=5.0 tests=BAYES_00,INVALID_MSGID, PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bc7813b85b027ce5 X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: 11.6 Date: 1999/11/23 Message-ID: #1/1 X-Deja-AN: 552278349 Sender: bobduff@world.std.com (Robert A Duff) References: <3836ff5b_1@news1.prserv.net> <3839d8a5_4@news1.prserv.net> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-11-23T00:00:00+00:00 List-Id: "Matthew Heaney" writes: > Compare that Push with this one: > > procedure Push > (Stack : in out Stack_Type; > Item : in Item_Type) is > > Stack_Not_Full : constant Boolean range True .. True := --??? > Stack.Top < Stack.Size; > > Top : Natural renames Stack.Top; > begin > Top := Top + 1; > Stack.Items (Top) := Item; > end Push; > > > Can the marked line be optimized away per 11.6? Yes. (I don't like 11.6, by the way.) But in the above you will still get a check on the array indexing. - Bob