Bill Allombert on Wed, 17 Feb 2010 08:43:56 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Getting the variable number of a lexical local variable |
On Tue, Feb 16, 2010 at 11:10:43PM -0500, Charles Greathouse wrote: > I'm trying to get the variable number of a lexical variable, but I > can't seem to figure out how to do that. > > If I have a function with a V in the prototype, like a custom for > loop, how do I know which variable was used? This is always -1. See ??"Functions to deal with lexical local variables"@5 > In my case, I would like to be able to distinguish between calls to > sumformal(x=1, N, x^2 * y) > and > sumformal(y=1, N, x^2 * y) What is the difference with sum() ? Cheers, Bill