Starting off with this fragment

begin // Start of procedure/function
  try
    ...
    if something then
      exit;
    ...
  finally
    ...
  end
end;

My understanding is that exit "magically" transfers control into the finally block before exiting the procedure. However to state the obvious, in this fragment

begin // Start of procedure/function
  try
    ...
    if something then
      exit;
    ...
  except
    ...
  end
end;

control doesn't go via the except block.

Is there a single place in the documentation where this sort of behaviour is described and prioritised, taking into account interfaces etc.?

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to