Sunday, June 12, 2011

3.10 try..Finally

3.10 try..Finally
try..finally similar with try..except. just different in writting and try..finally will execute the list of statements , whether there are errors or not.

sintax :
<code>
try
&lt;listofstatements1&gt;;
finally
&lt;listofstatements1&gt;;
end;
</code>

examples try..finally
<code>
Reset(F);
try
...//proces file F
finally
 CloseFile(F);
end;
</code>

No comments:

Post a Comment