Am Thursday 19 November 2009 22:40:53 schrieb Vinzent Höfler: > Rainer Stratmann <rainerstratm...@t-online.de>: > > For me a variable is initialised when it passes a procedure/function > > which has a var declaration in the parameters. > > -- 8< -- > procedure Add_2 (var I : Integer); > begin > I := I + 2; > end; > -- 8< -- > > If the variable for the parameter I wasn't correctly initialized before, it > would still contain garbage upon return.
Yes, but for that is the compiler-switch $PASS_VAR_NO_HINT ON. Then no hint is put out by the compiler. If this switch is on the programmer is resposible for initialising variables which pass a function. If someone doesn't find it useful then he/she is not forced to use the switch. I would use this switch if it exists. My code is full of this passing variables through procedures/functions. And also I wonder of this many hints. Rainer > > Vinzent. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal