From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: 11.6
Date: 1999/11/22
Date: 1999-11-22T00:00:00+00:00 [thread overview]
Message-ID: <3839d8a5_4@news1.prserv.net> (raw)
In-Reply-To: wcchfiexwj3.fsf@world.std.com
In article <wcchfiexwj3.fsf@world.std.com> , Robert A Duff
<bobduff@world.std.com> wrote:
>> procedure Push
>> (Stack : in out Stack_Type;
>> Item : in Item_Type) is
>>
>> subtype Top_Range is Positive range 1 .. Stack.Size;
>>
>> Top : Natural renames Stack.Top;
>> begin
>> Top := Top_Range'(Top + 1); --???
>> Stack.Items (Top) := Item;
>> end Push;
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?
--
Why stop at evolution and cosmology, though? Let's make sure that the
schoolkids of Kansas get a really first-rate education by loosening up
the teaching standards for other so-called scientific ideas that are,
after all, just theories. The atomic theory, for example. The theory of
relativity. Heck, the Copernican theory--do we really know that the
universe doesn't revolve around the earth?
John Rennie, Scientific American, Oct 1999
next prev parent reply other threads:[~1999-11-22 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 ` Matthew Heaney [this message]
1999-11-23 0:00 ` 11.6 Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox