Exits from the current procedure.
Exit causes the calling procedure to continue with the statement after the point at which the procedure was called.
Note: Exit passes control away from the current procedure, not merely the current block. However, Exit does not violate the flow of control dictated by a try..finally construct; if Exit is called inside the try clause, the finally clause is still executed.
Beginning with Object Pascal 2009, Exit can take a parameter specifying a result. The parameter must be of the same type as the result of the function. For example:
function DoSomething(aInteger: integer): string; begin if aInteger < 0 then begin Exit('Negative'); end; Result := 'Positive'; end;