journal file contents [message #30023] |
Thu, 04 April 2002 11:04  |
Med Bennett
Messages: 109 Registered: April 1997
|
Senior Member |
|
|
I am perusing a journal file and have a question about what's included.
If I issue a 'print' command, the results are saved in the file, but if
I use a help command, as in
help, where(ots eq 'o' and nnp ge 0 and agp lt 10.)
the answer is not saved in the file. This is somewhat of an
inconvenience, as it's the answer to the help command that is the value
that's needed for a particular calculation, and that I would like to be
able to refer to later on. I don't really want to do a print,where...
because I don't really care which elements meet the criteria, just how
many there are. Why is this?
----
Remove all w's from my email address to reply!
ICBM Coordinates: 40.027666N, 105.289188W, 1670 m
|
|
|
Re: journal file contents [message #30162 is a reply to message #30023] |
Thu, 04 April 2002 18:29  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
Med Bennett <mwbennett@windra.com> writes:
>
> well, thanks David . . . I guess I should have said that I knew that there
> were ways in this case to get around the problem - but what if there was
> information that only the help command could give you that you wanted to show
> up in the journal file?
Or, how about HELPFORM? This will render any IDL variable as a
string, expressed in the way that HELP would have rendered it.
Hopefully *that* output format is not proprietary. :-)
Good luck,
Craig
http://cow.physics.wisc.edu/~craigm/lib/idl/idl.html (under Introspection)
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|
Re: journal file contents [message #30166 is a reply to message #30023] |
Thu, 04 April 2002 14:36  |
Med Bennett
Messages: 109 Registered: April 1997
|
Senior Member |
|
|
David Fanning wrote:
> Med Bennett (mwbennett@windra.com) writes:
>
>> well, thanks David . . . I guess I should have said that I knew that there
>> were ways in this case to get around the problem - but what if there was
>> information that only the help command could give you that you wanted to show
>> up in the journal file?
>
> Well, then I think you would have to do this:
>
> IDL> Help, myvar, /Structure, Output=text
> IDL> FOR j=0,N_Elements(text)-1 DO Print, text[j]
>
> Of course, you would probably want to wrap those
> two commands up into a procedure called J_Help
> (or something) so you could just do this while
> you were journaling:
>
> IDL> J_Help, myvar, /Structure
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
brilliant as usual, David! Thanks again-
--
----
Remove all w's from my email address to reply!
ICBM Coordinates: 40.027666N, 105.289188W, 1670 m
|
|
|
Re: journal file contents [message #30169 is a reply to message #30023] |
Thu, 04 April 2002 13:20  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Med Bennett (mwbennett@windra.com) writes:
> well, thanks David . . . I guess I should have said that I knew that there
> were ways in this case to get around the problem - but what if there was
> information that only the help command could give you that you wanted to show
> up in the journal file?
Well, then I think you would have to do this:
IDL> Help, myvar, /Structure, Output=text
IDL> FOR j=0,N_Elements(text)-1 DO Print, text[j]
Of course, you would probably want to wrap those
two commands up into a procedure called J_Help
(or something) so you could just do this while
you were journaling:
IDL> J_Help, myvar, /Structure
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|