search for: some_index

Displaying 1 result from an estimated 1 matches for "some_index".

2007 Oct 20
1
Getting at what a named object represents in a function...
...in (via 'param') param[someindex]=another_value #doesn't change value in lits$A or list$B (whichever's been passed in as 'param') #I want something like: #if 'param' is list$A then list$A[someindex]=another_value #else if 'param' is list$B then list$B[some_index] = another_value } I then call this function on mylist$A (i.e. foo(mylist$A) and then on mylist$B (i.e. foo(mylist$B)) so 'param' in function foo is either mylist$A or mylist$B - can I tell which it is so that when param[someindex] is changed, it's actually mylist$A or mylist$B tha...