Name of variable after being passed



  I believe the healthshare Debug module did this (if you added it) but I no longer have access to Healthshare to look so am asking here.


Suppose I have;

Set fruit="apple"

set person="john"

d ..Something(fruit, person)



ClassMethod Something(objs...) {

  ; Names of variables passed in



In side "Something" how can I see the original name of the variable passed in (i.e. know the variables passed in were called fruit and person and not just their values).

I appreciate this is rare and not idea but I am 90% sure the Healthshare debug service allowed this so there must be some obscure "call" somewhere to know (or I'm wrong).  Anyone know the trick?



  • 0
  • 0
  • 88
  • 1
  • 1


You can try your luck with $stack.

What's the use case anyway?

The use case is some live software is not creating legacy index "sometime", logic looks good but some "combination" misses the index create.  In test works fine.  SO want to add lots of auditing and have a common call to an debug audit to record variables, objects etc.  Hence want to record the name of the variable used when calling the audit.

Anyway the $STACK pointed me at what I need and its all done and working...Thanks!