-- Code of Figure 9.8, page 376 from -- Kenneth C. Louden, Programming Languages -- Principles and Practice 2nd Edition -- Copyright (C) Brooks-Cole/ITP, 2003 -- With improvements described on page 377 package ComplexNumbers is type Complex is private; function "+"(x,y: in Complex) return Complex; -- add the following functions later --function "-"(x,y: in Complex) return Complex; --function "*"(x,y: in Complex) return Complex; --function "/"(x,y: in Complex) return Complex; --function "-"(z: in Complex) return Complex; function makeComplex (x,y: in Float) return Complex; function realPart (z: in Complex) return Float; function imaginaryPart (z: in Complex) return Float; private type ComplexRecord; -- incomplete type defined in package body type Complex is access ComplexRecord; -- a pointer type end ComplexNumbers;