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

Graeme Geldenhuys graeme at mastermaths.co.za
Thu Nov 19 07:25:15 CET 2009

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.

The original FillChar in FPC uses a 'var' parameter which expects
already initialized parameter. The "custom" FillChar that was suggested
earlier, use a 'out' parameter, which doesn't expect initialized values
because they are going to be initialized in the function with the out

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list