Hi Paul, there can be couple of possible solutions though. But a simple one is as follows:
Set fruit="apple"
set person="john"
Set tIindex = $ESTACK
Set ^VarIndex(tIindex,1) = "fruit"
Set ^VarIndex(tIindex,2) = "person"
d ..Something(fruit, person)
quit
ClassMethod Something(objs...) {
; Names of variables passed in
}
Using this method even if you call 100 methods each time method will quit and return to main method $ESTACK will restore its initial value. In each method we will just decrement its value by 1 and can access previous value (original name) of each variable. Moreover by indexing we can access any original name randomly.
This way
- Log in to post comments