Go backward to Packages and Abstract Data Types
Go up to Top
Go forward to Hidden Data Structures

Ada Packages

package point1 is
   function makepoint(x: Real, y: Real) return Point;
   function x_coord(P: Point) return Real;
   function y_coord(P: Point) return Real;
end point1;

package body point1 is
   function makepoint(x: Real, y: Real) return Point;
      - - implementation of makepoint
   function x_coord(P: Point) return Real;
      - - implementation of x_coord
   function y_coord(P: Point) return Real;
      - - implementation of y_coord
end point1;

Package specification and body are part of value specification!


Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: understand.tex,v 1.1 1996/06/12 09:38:21 schreine Exp schreine

Prev Up Next