|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 862 (0x35e)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Text_Io;
package body Stack_Generic is
procedure Push (The_Element : in Item; On : in out Object) is
begin
if not Is_Full (On) then
On.Top := On.Top + 1;
On.Content (On.Top) := The_Element;
else
raise Full;
end if;
end Push;
procedure Pop (The_Element : out Item; From : in out Object) is
begin
if not Is_Empty (From) then
The_Element := From.Content (From.Top);
From.Top := From.Top - 1;
else
raise Empty;
end if;
end Pop;
function Is_Empty (The_Stack : Object) return Boolean is
begin
return The_Stack.Top = Vide;
end Is_Empty;
function Is_Full (The_Stack : Object) return Boolean is
begin
return The_Stack.Top = The_Stack.Size;
end Is_Full;
end Stack_Generic;