[Lazarus] try finally exit

Jürgen Hestermann juergen.hestermann at gmx.de
Sat Jun 29 12:55:09 CEST 2013


Am 2013-06-28 22:34, schrieb Bart:
 > On 6/28/13, Junior <lazarus.linux at gmail.com> wrote:
 >> strList.TStringList.Create;
 >> try
 >>    if Pos('blablabla',strList.Text) = 0 then
 >>      Exit;
 >> finally
 >>     strList.Free;
 >> end;
 >> Adding "Exit", the finally is executed?
 > Just wondering. Why couldn't you test that yourself?

Is that the way programming is done today: "There is no documentation, just figure it out yourself"?
I can't believe it.
How can the programmer be sure that test results apply under all circumstances?
Does he have to write test routines for all possible szenarious?
What about nested try..finaly commands?
Is it guaranteed that all finally parts are executed?





More information about the Lazarus mailing list