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

Jonas Maebe 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).


Jonas


More information about the fpc-pascal mailing list