[fpc-pascal] how to initialize a SearchRec var?

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Jan 2 20:45:30 CET 2014


On 02/01/14 20:21, waldo kitty wrote:
> understanding that SearchRec has different formats for different OS
> targets, we've tried to use fillchar to initialize it to an empty
> record... unfortunately that does not remove the hint... instead the
> hint points to the fillchar line...

It is virtually impossible to get a realistic program free of any hints. 
Hints are the lowest possible verbosity level and their only goal is to 
help you pinpoint extremely unlikely sources of problems if you've 
exhausted all other options. They cause false positives by design (in 
this case: passing an uninitialized variable to a var-parameter; and 
since fillchar's first parameter is such a parameter and cannot be 
changed to "out" for reasons discussed many times before on this list, 
using that routine indeed does not help).


Jonas



More information about the fpc-pascal mailing list