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

Home » Public Forums » archive » RE: passing string parameter
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
RE: passing string parameter [message #7207] Sun, 20 October 1996 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
George McCabe <george@replica.gsfc.nasa.gov> writes:

> I want to write a small help procedure to display brief summaries
> of home made commands.

> IDL> helpme, command_name_string

> Is there a way to pass command_name_string to the procedure helpme
> without quotes?

If I understand this question correctly, I think you want to be able
to say:

HELPME, myCommand

And have your HELPME procedure interrpret "myCommand" as a string.
I can't think of any way to do this.

But I am sensitive to the problem. Let me suggest an alternative
approach. I define a HELP keyword for all my programs, so that
if I can't remember how to use them, I call them with the HELP
keyword set. If the HELP keyword is set, they print out a short
helpful message about how to use the program and return. Here
is an example of a little program named DOIT:

PRO DOIT, data, HELP=help
IF KEYWORD_SET(help) THEN BEGIN
PRINT, 'DOIT, data'
RETURN
ENDIF
PLOT, data
END

I picked up this little trick from Ray Sterner at Johns Hopkins
Applied Physics Lab, an excellent IDL programmer who always
writes programs that are *fully* documented.

Yours,

David

--
David Fanning, Ph.D.
Phone: 970-221-0438
Fax: 970-221-4728
E-Mail: davidf@fortnet.org
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: RE: colour-filling contours over maps
Next Topic: Here's a stupid question...

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

Current Time: Wed Oct 08 13:41:52 PDT 2025

Total time taken to generate the page: 0.00455 seconds