On Mon, Feb 18, 2013 at 8:02 AM, Lukasz Sokol <el.es...@gmail.com> wrote:

>
> Maybe he one and true answer for all of the above would be to have:
>
> try     vs              try
>   try                   except
>     try                 finally
>     except              except
>     end;                end;
>   finally
>   end;
> except
> end;
>
> so with except being optionally allowed either side of 'finally' ?
>
> I haven't actually tried this, but what would this do?

try
  try
  except
  end;
finally
  try
  except
  end;
end;

If this is what is really desired, is this a good construct?

try
  ...
except
  ...
finally
  ...
except
  ...
end;

  I don't care for the meaning of "except" looking to be contextual, but is
it really?  Reading that, to me it looks mostly predictable how the logic
would have to work.  I guess the only question is whether the finally code
is executed if the try code has an exception.  If this isn't desired, could
a "break" be used in the first except to cause the finally to be skipped?

Jeff.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to