with ada.text_io; use ada.text_io; 
with ada.integer_text_io; use ada.integer_text_io; 
 
-- Parent package
with intstackpkg; use intstackpkg; 

-- Child package
with intstackpkg.utils; use intstackpkg.utils; 

procedure intstackpkgclient  is 

    s: stacktype;                 -- Allocate a stack

begin
                                  -- Put some integers on it
    push(3, s);
    push(2, s);

    put(Top(s));                  -- Print the top
    -- put(s.elements(s.TheTop));

    put(size(s));                 -- Print stack size

    put(s);                       -- Print the stack
    put(toString(s));             -- Print the stack, again

    put(reverseIt(s));            -- Print stack in reverse
  
    reverseIt(s);                 -- Reverse stack
    put(s);                       -- Print reversed stack

    clear(s);                     -- Clear the stack
    put(size(s));                 -- Should be 0
    put(isEmpty(s)'img);          -- Should be true

end intstackpkgclient;