Re: How to Explain This Behavior of Simple Procedures?

*To*: mathgroup at smc.vnet.net*Subject*: [mg109642] Re: How to Explain This Behavior of Simple Procedures?*From*: Richard Fateman <fateman at cs.berkeley.edu>*Date*: Sun, 9 May 2010 07:51:34 -0400 (EDT)*References*: <hs3gjn$ru6$1@smc.vnet.net>

James Stein wrote: ... > > > My motivation here is to allow a procedure to return one or more subsidiary > results in variables provided by the caller. I suggest you re-think this motivation, since it leads to subtle bugs, and is probably difficult to do in Mathematica. I suggest you have a routine return a list of values. You can pick them out this way.. > {a,b,c} = {1,2,3} assigns values to a and b and c. This design abides more by functional abstraction. I haven't looked at the details of your example, but Mathematica's evaluation of names that are locally bound is a mess. Good luck. >