Christian Iversen wrote: > rare, however - and you have to be careful anyway, because this restriction > is not consistent: > > var > wait: boolean; > > procedure tfoo.ReadStuff(buffer: tbuffer; wait: boolean); > begin > // In here, wait could refer either to the parameter, or the global var. > end;
If the goal is consistency, I'd rather disable this scenario (with an appropriate error message) as well, rather than enable the other scenario. > However, it's not confused with the global var, because standard scoping > rules > apply. Same as with inner functions and such. Also, if you have a unit foo, It's not about confusion to the compiler, it's about confusion to the reader of the code :-). Micha _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel