[fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.
jonas.maebe at elis.ugent.be
Wed Nov 18 17:50:47 CET 2009
On 18 Nov 2009, at 17:35, Jürgen Hestermann wrote:
> 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.
a) a "var" parameter is considered as initialising a variable (although it also expects input to be initialised already)
b) "Uninitialised" hints/warnings are only given once per variable (even regardless of whether the warning/hint is printed or not, as the state of the variable in the compiler will be changed so that it won't be printed anymore).
More information about the fpc-pascal