Re: Long function defintions
- To: mathgroup at smc.vnet.net
- Subject: [mg49686] Re: Long function defintions
- From: "Mark Westwood [EPCC]" <markw at epcc.ed.ac.uk>
- Date: Tue, 27 Jul 2004 07:01:46 -0400 (EDT)
- Organization: Edinburgh University
- References: <ce2g6s$8t4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Aaron Read the documentation and help files for Module[] and Block[]. That should get you started. Regards Mark Westwood Aaron Fude wrote: > Hi, > > How do you define a function with a very long body and a bunch of > intermediate results. For example > > f[x_] := > > y = (Do some long integration) > z = (solve an ode which depends on the value of y) > t = (do another long integration) > assign (y + z + t) to f!!! > > The idea is that a function is best read if it is broken up but the > parts are not important enough to be made into their own functions. > > Thanks! > > Aaron >