Re: redirection of help [message #743] |
Tue, 20 October 1992 05:30 |
knight
Messages: 37 Registered: January 1992
|
Member |
|
|
In article <1992Oct19.142045.3309@aragorn.unibe.ch>, magun@iam.unibe.ch (A. Magun IAP) writes:
|> Dear IDL-users,
|>
|> how can one redirect the output of the help command to a string
|> variable or file? - We need access to the name of a structure
|> during run time.
|>
|> Andreas Magun
|>
|>
Unless there has been a change since version 2.3.x, you can't redirect help
output. I've asked RSI to incorporate a redirection capability because, as in
your case, there are times when the help text can provide information. One
example is the size in bytes of a structure, which was only available from
the help until the addition of the following:
IDL> z={a:bytarr(9),b:0.}
IDL> print,n_tags(z,/length)
16
(Note that you get the length of the structure in bytes in memory on the
current machine---not the length of the variables it contains. If you want
the latter, David Stern suggested writing the structure to a file and using
the size tag returned by the fstat structure.)
Another example where the help redirection would have an advantage is in
documenting your variables in an output file. The help is reported to the
journal file, but I have found occasions when I wanted to produce a
description of a variable in another output file, for example, when I am
doing a calculation for signal-to-noise and want to record the current
parameter values.
In summary, I have found occasions when redirecting help would be useful.
I would like to see redirection of help incorporated into IDL.
Fred
--
=Fred Knight (knight@ll.mit.edu) (617) 981-2027
C-483\\MIT Lincoln Laboratory\\244 Wood Street\\Lexington, MA 02173
|
|
|