[fpc-pascal] How to solve "variable does not seem to =?utf-8?q?be=09initialized?=" compiler hint.
RainerStratmann at t-online.de
Fri Nov 20 08:57:08 CET 2009
Am Friday 20 November 2009 07:40:33 schrieb Graeme Geldenhuys:
> 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().
But how do you solve the hints where a variable is initialised by a function
call with a var in the parameters then?
May be it is possible to print hints and warnings in different colours in the
output screen. Then it is more userfriendly.
> 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.
> - Graeme -
More information about the fpc-pascal