[fpc-pascal] how to initialize a SearchRec var?
Sven Barth
pascaldragon at googlemail.com
Thu Jan 2 20:53:59 CET 2014
On 02.01.2014 20:50, Florian Klämpfl wrote:
> Am 02.01.2014 20:21, schrieb waldo kitty:
>>
>>
>> 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...
>>
>> we do not want to turn off hints so how can we initialize dirinfo and
>> make fpc happy?
>
> With 2.7+ you can use Default (in objfpc mode):
>
> dirinfo:=Default(SearchRec);
It does not need mode ObjFPC, Default() is supported in any mode (as
it's a "system magic function" like Length(), High(), etc..
Regards,
Sven
More information about the fpc-pascal
mailing list