Re: procedures

*To*: mathgroup at smc.vnet.net*Subject*: [mg96980] Re: [mg96937] procedures*From*: Sseziwa Mukasa <mukasa at jeol.com>*Date*: Sat, 28 Feb 2009 06:45:54 -0500 (EST)*References*: <200902271116.GAA21679@smc.vnet.net>

On Feb 27, 2009, at 6:16 AM, ventutech at gmail.com wrote: > Simple question: Unfortunately no simple answer. > how can I in mathematica write a complex function? What do you mean by complex. > What I need to do is (pseudocode) > > FunctionToCode[x,n] { > > D[x_,n]:= something symbolic > > Do[ D[x,s]=D[x,s], {s,0,n} ]; > > return D[x,s] > Clear[D] > } Your meaning is not clear, D[x_,n] defines a function for a fixed variable n, I think you meant D[x_,n_]. Secondly is D supposed to have side effects? What is the purpose of assigning its value to itself? Third, s only has value within the Do loop, do you mean to return D[x,n]? Fourth, why clear D? In short the pseudocode raises more questions than one could answer. Best Regards, Sseziwa Mukasa

**References**:**procedures***From:*ventutech@gmail.com