dummy indicies
- To: mathgroup at smc.vnet.net
- Subject: [mg35882] dummy indicies
- From: Christopher Maierle <chris at chaos.Physik.uni-dortmund.de>
- Date: Mon, 5 Aug 2002 06:01:54 -0400 (EDT)
- Organization: Universitaet Dortmund
- Sender: owner-wri-mathgroup at wolfram.com
This is a repost of a question I asked last week. Apparently, I wasn't
clear about my problem. I have written a function that is similar to
the Mathematica function Sum in that the user needs to use dummy indicies in order
to CALL the function. That is, one enters,
mysum[f[i,j,k,...],{i,mini,maxi},{j,minj,maxj},{k,mink,maxk},...]
The function works the way I want it to except that I must be certain
that the dummy variables i, j, k, etc... are not already defined in the
Global context. In other words, because I have not done anything special
in defining the function, Mathematica will substitute in any Global values that
exist for i, j, k, before using the arguments of mysum in a computation.
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? I figure this has something to do with
setting attributes for mysum but I haven't been able to work out all the
details. Any help would be much appreciated.
thanks in advance
-ciao
-chris