[Lazarus] Testing Assigned object

cobines cobines at gmail.com
Mon Apr 25 19:43:09 CEST 2011


2011/4/25 Marco van de Voort <marcov at stack.nl>:
> Just to be clear
>
> Initialize it in code not in the declaration, since in the declaration afaik
> that makes it a static variable instead of a truely local one, even when declared
> with local scope.

procedure Test;
var
  i: Integer = 0;
  p: Pointer = nil;
  t: TObject = nil;
begin
end;

These are not local variables? If not, what are the consequences of
them being static variables? I assume it is worse, since you recommend
otherwise.

--
cobines




More information about the Lazarus mailing list