From: sunandadh:aol at: 27-Dec-2001 20:17
> I have found a not so standard method to find the funtion name and the code
> inside a function. It works also if the funtion name is local:
> What do you think of this method? Can be considered valid in all the
I think it's a very clever hack!
Unfortunately it doesn't work for a function in ab object:
HackO: make Object! [
hackF: func ["hackF" /local myself] [
error? err: disarm try [2 / 0]
myself: get in err 'where
"my name is:" myself
"^/my body is:" mold second get myself
"^/my spec is:" mold third get myself
I'm disappointed with Rebol that something as simple as "What's the name of
the current function?" isn't easily available, something like:
A few weeks back I spent a while looking through the System object for a call
stack. It must exist, and does exist for "Do Script.r" but I couldn't find it
. They must be hiding it from us!
If RT would put the stack in the system object along with everything else,
it'd make formatting useful debugging reports a lot more useful.