Calling Func/Proc
- Posted by c.k.lester <euphoric at ckl?ster.com> Jul 11, 2007
- 706 views
I would really like to have a function that returns the name of the calling func/proc. To be used like as follows: function query_db(sequence s) if debug then logfile( calling_proc() ) end if ... end function logfile() is my output function. In this case, I am using it for debugging purposes. Instead of putting hundreds of lines of code (one for each function that would call query_db()), I'd rather just have the one line in query_db(). That seems reasonable, doesn't it? Is this possible, and how easy if so?