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

Graeme Geldenhuys graeme at mastermaths.co.za
Fri Nov 20 07:40:33 CET 2009


Rainer Stratmann wrote:
> May be it is possible to make a compiler switch like
> $PASS_VAR_NO_HINT ON

No. My issue is not the hint in general. The hint is if for "real"
issues. My issue is that I tried to solve the compiler hint by manually
initializing my structured types using FillChar(). And it return the
hint did not go away, it simply moved location to the call to FillChar().

This was not what I expected. FillChar() is very often used to
initialize structured types and arrays, so I did not expect the
FillChar() to give me that same compiler hint. At closes inspection, I
noticed the issue with FillChar - the first var parameter that should
have been a out parameter.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list