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

Home » Public Forums » archive » Function call string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Function call string [message #90756] Thu, 09 April 2015 13:20 Go to previous message
Gordon Farquharson is currently offline  Gordon Farquharson
Messages: 48
Registered: December 2010
Member
Is there a way to access the string that was used to call a function or procedure in IDL? For example, lets say I call:

display, 'A carrot is orange'

Is there a way to access the string "display, 'A carrot is orange'" from within the display procedure?

The reason I'd like to do this is that I'd like to record how a function or procedure was called in the meta data that the function or procedure generates, so that it is easy to make the same call again in the future.

(I seem to recall that there was a discussion on this topic previously, but I can't find the thread.)

I realize that I could construct the function call string from the arguments, but the output is not generic or pretty because one has to decide on things like how many decimal places to use to represent floating point values, and one has to take care of each keyword setting.

Maybe a better self-documenting way to do this is to have a configuration file, e.g., an XML file that the procedure or function reads, and that accompanies the output. While I have done this previously for other routines, it seems a little overkill for my current application. Maybe it is the best solution though.

(Not sure if David is still posting tips for his web page, but this would be a cool one to add if there is a neat solution. Maybe he already has it there.)

Gordon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MPFITFUN error -- only reading the first data value
Next Topic: My IDL 8.4 crashes on HELP,/LAMBDA command

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

Current Time: Wed Oct 08 11:30:06 PDT 2025

Total time taken to generate the page: 0.00430 seconds