From: Robert A Duff <bobduff@world.std.com>
Subject: Re: 11.6
Date: 1999/11/23
Date: 1999-11-23T00:00:00+00:00 [thread overview]
Message-ID: <wcc66ys7p3v.fsf@world.std.com> (raw)
In-Reply-To: 3839d8a5_4@news1.prserv.net
"Matthew Heaney" <matthew_heaney@acm.org> 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
prev parent reply other threads:[~1999-11-23 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-20 0:00 11.6 Matthew Heaney
1999-11-22 0:00 ` 11.6 Mats Weber
1999-11-22 0:00 ` 11.6 Robert Dewar
1999-11-22 0:00 ` 11.6 Robert A Duff
1999-11-22 0:00 ` 11.6 Matthew Heaney
1999-11-23 0:00 ` Robert A Duff [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox