| Author |
Comment/Response |
Marc
|
07/20/06 10:57pm
I just found out that function arguments cannot be used as local variables. For example:
f[x_] :=
(x = x + 1;
x^2 + x - 7)
is illegal because x is replaced by the argument value and say f[1] would try 1 = 1+1.
Any insight on why that is? Is the only solution to use Module or Block local variables?
Cheers
URL: , |
|