proc/MyProc()
world << "Running [thisproc()]"
Returns: "MyProc"
ID:166959
![]() May 24 2006, 9:28 am
|
|
Is there some way to do this? Like this:
proc/MyProc() Returns: "MyProc" |
I don't think so. I've suggested it before, and I've also suggested a way to get not only the current proc but the entire call stack. For now we have to find ways to work around it ourselves.
|
Well, the proc does have a name; it has to if it can be used as a verb. However, objects don't have a procs list variable like they do for verbs. I suppose perhaps you could add the proc to a verbs list then turn around and treat it as a verb to get its name. But then that takes more work to accomplish the same thing as just having a variable like you showed, so it'd be silly to do.
There should be a keyword for functions that refers to the instance of the function. And then perhaps there should also be an actual object of type /function. |
Seems like the simplest solution. Isn't there a name variable for procs? Or something like that, that gets set by default?