begin comment PointOnLine procedure: is point on line?; record RPoint (real x, y); record RLine (real a, b, c); logical procedure PointOnLine(reference(RPoint) value point; reference(RLine) value line ); begin real d; d := a(line) + b(line)*x(point) + c(line)*y(point); write(d); abs(d) < 0.000001 end; reference(RPoint) pt; reference(RLine) lin; boolean res; pt := RPoint( 1, 1); lin := RLine(1.0, 2.0, -3.0); res := PointOnLine(pt, lin); write(res); pt := RPoint( 1, 3); res := PointOnLine(pt, lin); write(res); end.