begin comment distance between two points; real dist; record RPoint (real x, y); reference(RPoint) pt1; reference(RPoint) pt2; pt1 := RPoint(1.0, 2.0); pt2 := RPoint(2.0, -2.0); dist := (x(pt2)-x(pt1))**2 + (y(pt2)-y(pt1))**2; dist := sqrt(dist); write(dist); end.