[fpc-pascal] Initializing a record-type variable to get rid of the false-positive compiler hint
José Mejuto
joshyfun at gmail.com
Wed Apr 14 18:54:50 CEST 2010
Hello FPC-Pascal,
Wednesday, April 14, 2010, 5:13:51 PM, you wrote:
BA> Supposing I have a record-type variable, could someone here
BA> tell me how to initialize it properly so that FPC could notice the
BA> initialization, since the FillByte() and FillChar() way do not
BA> cause FPC aware of it?
I'm using:
procedure InitRecord(out Rec; const ASize: SizeUint);
begin
{$PUSH}
{$HINTS OFF}
FillByte(Rec,ASize,0);
{$POP}
end;
Unfortunatly it can not be inlined :( due the formal parameter.
--
Best regards,
José
More information about the fpc-pascal
mailing list