MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: dummy indicies

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35909] Re: dummy indicies
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Wed, 7 Aug 2002 05:59:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/5/02 at 6:01 AM, chris at chaos.Physik.uni-dortmund.de (Christopher
Maierle) wrote:

>I would rather be able to use dummy indicies without making sure that
>they are not already defined.  The Mathematica function Sum behaves
>this way.  How do I write a function like that?

Use the Module construct. The syntax would look something like

f[x_ ... ]:= Module[{i,j,...}, <function body>]. The variables i,j etc in the first list appearing as an argument to Module are guarenteed to be local variables and do what you want.

Look up Module in the help browser for more detail


  • Prev by Date: Reading/Writing files across networks
  • Next by Date: Re: Using % in ; separated commands
  • Previous by thread: dummy indicies
  • Next by thread: RE: dummy indicies