begin comment record RSegment for line segment description; record RPoint (real xcoor, ycoor); record RSegment(reference(RPoint) PtA, PtB); real procedure SegmentLength(reference(RSegment) value rss); begin real l1, l2; l1 := xcoor(PtA(rss)) - xcoor(PtA(rss)); l2 := ycoor(PtA(rss)) - ycoor(PtA(rss)); write(l1, l2); comment sqrt(l1*l1 + l2*l2); 0 end; reference (RSegment) rs; real len; rs := RSegment( RPoint(0,0), RPoint(1,1)); len := SegmentLength(rs); write(len); end.