func test() var v1:=1; if 1=1 then v1:=2; var v2:=1; end; (* v2 not visible *) v2:=3; end;