|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Stack, seg_0564cf
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Text_Io;
package body Stack is
procedure Creation (O : in out Objet) is
begin
O.Sp := 1;
end Creation;
procedure Destruction (O : in out Objet) is
begin
O.Sp := 1;
end Destruction;
procedure Push (O : in out Objet; I : in Item) is
begin
if O.Sp = Indice (Maxitem) then
raise Overflow;
else
O.Pile (O.Sp) := I;
O.Sp := O.Sp + 1;
end if;
end Push;
procedure Pop (O : in out Objet) is
begin
if O.Sp > 1 then
O.Sp := O.Sp - 1;
end if;
end Pop;
procedure Top (O : in Objet; I : out Item) is
begin
I := O.Pile (O.Sp - 1);
end Top;
function Vide (O : in Objet) return Boolean is
begin
return (O.Sp = 1);
end Vide;
function Pleine (O : in Objet) return Boolean is
begin
return (O.Sp = O.Taille);
end Pleine;
procedure Afficher (O : in Objet) is
I : Indice;
begin
Text_Io.Put_Line ("Nombre d'element dans la pile : " &
Integer'Image (Integer (O.Sp - 1)));
for I in reverse 1 .. (O.Sp - 1) loop
Afficher (O.Pile (I));
end loop;
end Afficher;
end Stack;
nblk1=2
nid=0
hdr6=4
[0x00] rec0=31 rec1=00 rec2=01 rec3=00c
[0x01] rec0=0e rec1=00 rec2=02 rec3=001
tail 0x2154da18487c4387624f2 0x42a00088462060003