Declaration:  ResultPointX2: Double;
Returns the x2 coordinate from the last Getline or GetRect.

Source Code:

var
  x1, x2, y1, y2: double;

begin
  if getline(x1, y1, x2, y2, 'Click Points') = 1 then
    result := resultpointx2;  // should be same as x
end;