, , , , .
, , , , , TAilmentP ... , , , , (.. , -, , , OUTSIDE, ).
( , , ), , , (, ++, ), , - .
procedure ShowAilmentName (Ailment: TAilmentP);
begin
ShowMessage (Ailment.Name);
end;
[...]
begin
ShowAilmentName (5);
end.
, , .: D
, 5, , TAilmentP ( TAilmentP ) , Ailment, , , TAilmentP, , .
, Ailment const, ( ).
++ . TAilmentP, Byte. Delphi, , , ++ , Delphi , (Byte, Integer ..), . , " ShowAilmentName (Number: Byte)"; "ShowAilmentName (SomeAilment)" ++, Delphi .
So, I assume that this is a side effect of the Implicit statement, which is also similar to a constructor, and this is necessary because records cannot have prototypes (thus, you cannot convert both methods and the other between two records, just using constructors) . Does anyone else think this could be the reason?