Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Delayed function arguments' topicStudent Support Forum > General > "Delayed function arguments"

Next Comment >Help | Reply To Topic
Author Comment/Response
Mathias
04/27/13 2:03pm

I am working on a project where I need to use delayed functions of the form f[a1_,a2_,...]:=func(a1,a2,...). My problem is that I need a lot of input parameters (about ten) and that I have to work with several functions to which I have to pass these same parameters again. First of all this makes dreadfully long expressions because the same list of parameters ai has to written down each time, but moreover it is annoying whenever I have to remove, add or rename one of the parameters, as this has to be done manually throughout the whole sheet in every function declaration and every function call. Is there a proper way to define a parameter list in the beginning, which can then be passed as an argument?
I am looking for something of the form:
pars={a1,a2,...};
f[pars]:=func[pars];

Thanks for your help!

URL: ,

Subject (listing for 'Delayed function arguments')
Author Date Posted
Delayed function arguments Mathias 04/27/13 2:03pm
Re: Delayed function arguments Bill Simpson 04/28/13 1:40pm
Re: Delayed function arguments jc 04/29/13 5:45pm
Next Comment >Help | Reply To Topic