Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
16
Task/Stack/Ada/stack-1.ada
Normal file
16
Task/Stack/Ada/stack-1.ada
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
generic
|
||||
type Element_Type is private;
|
||||
package Generic_Stack is
|
||||
type Stack is private;
|
||||
procedure Push (Item : Element_Type; Onto : in out Stack);
|
||||
procedure Pop (Item : out Element_Type; From : in out Stack);
|
||||
function Create return Stack;
|
||||
Stack_Empty_Error : exception;
|
||||
private
|
||||
type Node;
|
||||
type Stack is access Node;
|
||||
type Node is record
|
||||
Element : Element_Type;
|
||||
Next : Stack := null;
|
||||
end record;
|
||||
end Generic_Stack;
|
||||
Loading…
Add table
Add a link
Reference in a new issue