On Mon, Jul 5, 2010 at 9:07 PM, Reimar Grabowski <reimg...@web.de> wrote: > On Mon, 5 Jul 2010 16:51:54 -0300 > Marcos Douglas <m...@delfire.net> wrote: > >> What do you mean "a function has effects is already bad"? >> A function/procedure always has effects, don't? > > IMHO he means that a function should only return a value and not change > the state of an object, a variable or any other program state at all. > This is good practice but there are obvious cases where this rule makes no > sense, for example boolean functions, that use the return value to indicate > success/failure, etc. >
We talk about just *functions* or we talk about *methods* too? I agree with you, but in part... If a *function* should only return a value then, what do a *procedure*? What are the good pratice for procedures? Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal