previous up next
Go backward to Use of Packages
Go up to Top
Go forward to Ada Packages
RISC-Linz logo

Packages and Abstract Data Types

type Point = Real x Real
type Point1 =
   {makepoint: (Real x Real) -> Point,
      x_coord: Point x Real,
      y_coord: Point x Real}

value point1: Point1 =
   {makepoint = fun(x:Real, y:Real)(x, y),
      x_coord = fun(p:Point) fst(p),
      y_coord = fun(p:Point) snd(p)}

Author: Wolfgang Schreiner
Last Modification: May 27, 1998

previous up next