how did I get here? [message #90835] |
Fri, 24 April 2015 16:03  |
don.woodraska
Messages: 13 Registered: October 2005
|
Junior Member |
|
|
Is there a programmatic way that I can get the name of the parent function from within a child function without using the help command? In other words, how did I get here? There is a call stack that you can see when you throw an error, and I can get this without an error by calling help like this:
IDL> help, /traceback, output=usefulInformationThatIWantToHaveProgrammatically
This is something that IDL obviously knows about, since it is available through help, but they don't want us to use that. The IDL help says the following about the output keyword to the help procedure: "This keyword is not intended to be used in obtaining programmatic information about the IDL session". That begs the question of how am I supposed to get programmatic information about my IDL session?
The help on help could be a little more ... helpful.
Maybe this is an easy thing and one of you knows how to do this. I suspect this is not possible without recklessly using help,output= in a manner that it is not intended.
Cheers!
|
|
|
Re: how did I get here? [message #90836 is a reply to message #90835] |
Fri, 24 April 2015 16:11   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
Look at the SCOPE_TRACEBACK function.
On Friday, April 24, 2015 at 7:03:46 PM UTC-4, don.wo...@gmail.com wrote:
> Is there a programmatic way that I can get the name of the parent function from within a child function without using the help command? In other words, how did I get here? There is a call stack that you can see when you throw an error, and I can get this without an error by calling help like this:
>
> IDL> help, /traceback, output=usefulInformationThatIWantToHaveProgrammatically
>
> This is something that IDL obviously knows about, since it is available through help, but they don't want us to use that. The IDL help says the following about the output keyword to the help procedure: "This keyword is not intended to be used in obtaining programmatic information about the IDL session". That begs the question of how am I supposed to get programmatic information about my IDL session?
>
> The help on help could be a little more ... helpful.
>
> Maybe this is an easy thing and one of you knows how to do this. I suspect this is not possible without recklessly using help,output= in a manner that it is not intended.
>
> Cheers!
|
|
|
|
|