[Lazarus] try finally exit

Lukasz Sokol el.es.cr at gmail.com
Fri Jun 28 16:05:18 CEST 2013


On 28/06/2013 14:59, Junior wrote:
> strList.TStringList.Create;
> try
>   if Pos('blablabla',strList.Text) = 0 then
>     Exit;
> 
> finally
>    strList.Free;
> end;
> 
> Adding "Exit", the finally is executed?
> 

Yes. your example lacks some example code after Exit, before Finally, that will be
omitted.

> thanks
> 

-L;





More information about the Lazarus mailing list