admin wrote:Undocumented. next beta:
echo caller("caption");
echo caller("File");
etc. ... analog to self.
He's done it
(At least I wouldn't have expected it so fast

)
Thanks a lot, again!
Sometimes I just have a bit of problems with those undocumented functions.
Sometimes ist's hard enough to find a documented function. (If you know what you might want, but not what it's name...)
Undocumented functions everybody has to note for his own. And if you should loose one: it's lost for you
Don't get me wrong: better undocumented than nothing
But I just don't know if it makes sense to make it undocumented...
klownboy wrote:Hey PeterH, I'm curious, have any ideas or examples on how we might use the "caption" or "file" of calling script(s). Do you plan on a different execution, or go to a different "sub", or menu dependent on which script does the calling? Thanks,
Ken
Sure: I'm playing with some test for a set of routines to create something like a log for script execution. You call routines for start & end of a script, and call one to supply logic information from the script (i.e. when/how to make decisions, loops, etc) - this should help in debugging scripts.
Here it helps very much if the debug-scripts have the ability to see from where (script & caption) they were called.
All this is quite hard, as we can't call scripts with parameters. On one side I try to help for this with permanent vars. And on the other side it can help if the called script is able to get info about it's caller.
In the moment all is in a kind of testing level. If - in the end - I will like it I might publish it here.
But there are a lot of difficulties by the missing ability of paramenters, and the missing ability to explicitely share variables between a routine and called code (maybe name it %include% or such). The result is that the code "doesn't look very nice", and it's still not really easy to use. So I must try some more time to see if it makes sense or not...