[fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.
"Vinzent Höfler"
JeLlyFish.software at gmx.net
Thu Nov 19 20:25:10 CET 2009
Florian Klaempfl <florian at freepascal.org>:
> Out is not made to solve such problems but plainly to work with
> COM/Corba.
Really? Well, that's not what the FPC manual says:
-- 8< --
The purpose of an out parameter is to pass values back to the calling routine: The variable is passed by reference. The initial value of the parameter on function entry is discarded, and should not be used.
If a variable must be used to pass a value to a function and retrieve data from the function, then a variable parameter must be used. If only a value must be retrieved, a out parameter can be used.
-- 8< --
So having the semantic difference between "var" and "out" and thus the differentiation between uninitialized and (pre)initialized parameters is merely a random achievement?
Vinzent.
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the fpc-pascal
mailing list