comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how did I get here?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how did I get here? [message #90835] Fri, 24 April 2015 16:03 Go to next message
don.woodraska is currently offline  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 Go to previous messageGo to next message
wlandsman is currently offline  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!
Re: how did I get here? [message #90838 is a reply to message #90835] Fri, 24 April 2015 16:24 Go to previous messageGo to next message
don.woodraska is currently offline  don.woodraska
Messages: 13
Registered: October 2005
Junior Member
That's perfect! Thank you for suggesting scope_traceback.
Re: how did I get here? [message #90840 is a reply to message #90838] Fri, 24 April 2015 18:39 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
don.woodraska@gmail.com writes:

> That's perfect! Thank you for suggesting scope_traceback.

You might find the cgWhoCalledMe function useful, too:

http://www.idlcoyote.com/programs/cgwhocalledme.pro
http://idlcoyote.com/idldoc/cg/cgwhocalledme.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dfourt
Next Topic: Duplicating an array help

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:22:56 PDT 2025

Total time taken to generate the page: 0.00418 seconds