OO Integer Stack Body
MC logo
 

OO Integer Stack Body

Ada Code Examples


<<OO Integer Stack Package Download OO String Stack Package>>
--
-- Body of integer stack facility.
--
package body IStack is
   -- Create data for pushing.
   function IDat(I: Integer) return IntStackData is
      RetVal: IntStackData;
   begin
      RetVal.V := I;
      return RetVal;
   end IDat;

   -- Extract integer value from the stacked object
   function IValue(R: IntStackData) return Integer is
   begin
      return R.V;
   end IValue;

end IStack;
<<OO Integer Stack Package OO String Stack Package>>