Listing: 1 DEFINITION MODULE Rectangles; 2 (* 3 * REPERTOIRE 4 * Release 1.6 5 * By Charles Bradford and Cole Brecheen 6 * (c) Copyright 1985-1992 PMI 7 * Green Bay, Wisconsin 8 * All rights reserved 9 * (414) 468-6040 10 * 11 * $Header: D:/logfiles/defs/rectangl.dev 1.4 30 Dec 1990 18:03:54 coleb $ 12 * 13 *) 14 15 16 17 TYPE 18 APoint = 19 RECORD 20 col, row : INTEGER; 21 END; ***** ^ not supported yet 22 23 ALine = 24 RECORD 25 p1, p2 : APoint; 26 END; ***** ^ not supported yet 27 28 ARectangle = 29 RECORD 30 CASE : BOOLEAN OF ***** ^ not supported yet ***** ^ 'POINTER' expected 31 TRUE : 32 TopLeft, BottomRight : APoint; 33 | FALSE : 34 col1, row1, col2, row2 : INTEGER; 35 END; 36 END; 37 38 PROCEDURE PointInside(VAR p : APoint; VAR r : 39 ARectangle) : BOOLEAN; 40 41 PROCEDURE Distance(p1, p2 : APoint) : CARDINAL; 42 43 PROCEDURE RectsIntersect(VAR r1, r2, 44 intersection : ARectangle) : BOOLEAN; 45 46 PROCEDURE LineInside(TheLine : ALine; r : 47 ARectangle; VAR intersection : ALine) : 48 BOOLEAN; 49 50 PROCEDURE DefineRectangle(VAR r : ARectangle; 51 col1, row1, col2, row2 : INTEGER); 52 53 PROCEDURE DefineByPoints(VAR r : ARectangle; 54 TopLeft, BottomRight : APoint); 55 56 PROCEDURE RectIsInside( VAR r1, r2 : ARectangle 57 ): BOOLEAN; 58 59 PROCEDURE ShrinkRect( VAR r : ARectangle ); 60 61 PROCEDURE ExpandRect( VAR r : ARectangle ); 62 63 PROCEDURE Init(); 64 65 END Rectangles. 4 errors