Vincent Snijders wrote:
Michalis Kamburelis wrote:

Are there any other cases where this issue may be significant ? If no, I'll mark this wiki page clearly as "only for FPC earlier than 2004-12-28" (to-be-removed when 2.0 comes in), else I will update it.

(Note: we can continue this talk on wiki page

already started by Vincent with that question)


I haven't tested it, but I have this hunch.
Ansistrings (not constant) also require implicit try finally.
If you use ansi strings only in a seldom used if-branch in a procedure, you could extract the procedure too, just like you did for the resource string.

for example:
If (i>0) then
  'do something but not with ansistrings
  writeln('Invalid value: '+IntToStr(i));


I suspected that every type that needs to be initialized/finalized creates such try...finally block, but didn't have time to check. But I checked it now. OK, page in wiki is changed, and demo program there is changed.


fpc-devel maillist  -

Reply via email to