•ZPL
allows programmers to define a type
•Rather
than using X and Y arrays, define
•type cartPoint =
record
• x : integer; -- x coordinate
• y : integer; -- y coordinate
• end;
•...
•var Pts : [1..n] cartPoint;
-- an array of points
–
rightedge := max<<
Pts.x;
–
topedge := max<<
Pts.y;
–
leftedge := min<<
Pts.x;
–
bottomedge := min<< Pts.y;