[fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.

Jürgen Hestermann juergen.hestermann at gmx.de
Wed Nov 18 17:35:02 CET 2009


>>> begin
>>> {$PUSH}
>>> {$HINTS OFF}
>>>  FillChar(x,count,Value);
>>> {$POP}
>>> end;
>> Shouldn't this code too raise a warning?
> No, that's what the {$HINTS OFF} is used for - hiding the compiler hints
> & warnings.

But isn't the warning raised when x is used as a parameter of a function? The problem is, that fillchar is not considered to be an initialization of x. So when using x it is still considered uninitialized.





More information about the fpc-pascal mailing list