On 05/08/2010 17:41, Richard Fateman wrote:
> Try
>
> foo(y):=block([x:?gensym()],find_root(exp(x)+x=y,x,0,1));
>
> The "Module" feature is Mathematica is actually hazardous since you
> can, in fact,
> access the "local" names it generates, globally. Just type them in.
>
> Often people just use names that they think will not be used by
> others, e.g.
>
> foo(y):=block([xxx], ....) but that is not entirely safe.
>
>
Excellent, that does the trick!
Thank you very much!
Would be great if that suggestion could be added onto the online manual
at the "block" page.
Sergio