So it's late and I may be a bit dafter than usual, but any reason why this doesn't complain that "r" is uninitialized in the DoIt procedure?
So it's late and I may be a bit dafter than usual, but any reason why this doesn't complain that "r" is uninitialized in the DoIt procedure?
type
TRec = record
x: integer;
end;
procedure f(const r: TRec);
begin
WriteLn(r.x);
end;
procedure DoIt;
var
r: TRec;
begin
f(r);
end;
begin
DoIt();
end.
edit: using XE5, don't have access to XE6 here.
type
TRec = record
x: integer;
end;
procedure f(const r: TRec);
begin
WriteLn(r.x);
end;
procedure DoIt;
var
r: TRec;
begin
f(r);
end;
begin
DoIt();
end.
edit: using XE5, don't have access to XE6 here.
Comments
Post a Comment