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 - downloadIndex: ┃ B T ┃
Length: 1189 (0x4a5) 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⟧
package body Stack_Lifo is procedure Push (File : in out Object; The_Element : Integer) is begin if not Is_Full (File) then File.The_Contents (File.The_Head + 1) := The_Element; File.The_Head := File.The_Head + 1; else raise Full; end if; end Push; procedure Pop (File : in out Object; The_Element : out Integer) is begin if not Is_Empty (File) then The_Element := File.The_Contents (File.The_Head); File.The_Head := File.The_Head - 1; else raise Empty; end if; end Pop; function The_Top (File : Object) return Integer is begin return File.The_Contents (File.The_Head); end The_Top; function Is_Empty (File : Object) return Boolean is begin if File.The_Head = 1 then return True; else return False; end if; end Is_Empty; function Is_Full (File : Object) return Boolean is begin if File.The_Head = File.The_Contents'Last then return True; else return False; end if; end Is_Full; end Stack_Lifo;