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

Home » Public Forums » archive » Making help for your own functions & procedures
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
Making help for your own functions & procedures [message #860] Thu, 08 April 1993 07:06 Go to next message
kaij is currently offline  kaij
Messages: 1
Registered: April 1993
Junior Member
n IDL 3.0.1 for WINDOWS there is very good online help-tool. Unfortunatly only the functions & procedures know by the makers of IDL are in this help-tool; there are however frequently used functions & procedures written by others that we would like to add to this help-tool. Is there a way to to do this?

Please send your answers to:

,,,
(o o)
+----------------------------oOO--(_)--OOo------------------ ----------+
| Roland Kaijen Lorentzweg 1 |
| Delft University of Technology 2628 CJ Delft |
| Applied Physics Department - Spin Imaging Group The Netherlands |
+----------------------------------------------------------- ----------+
| email kaij@si.tn.tudelft.nl voice +31-15-786708 fax +31-15-624978 |
+----------------------------------------------------------- ----------+
Re: Making help for your own functions & procedures [message #982 is a reply to message #860] Fri, 16 April 1993 15:17 Go to previous message
knight is currently offline  knight
Messages: 37
Registered: January 1992
Member
A recent thread (repeated below) concerns making help for your own functions.
Here's what I do. On all functions and procedures I include a keyword help,
which, when set, triggers doc_library to print the header. For example,

IDL> legend,/help
% Compiled module: LEGEND.
% Compiled module: DOC_LIBRARY.
% Compiled module: DL_UNIX.

----- Documentation for /usr/local/idl/lib/local/legend.pro -----
Name:
legend
Purpose:
This procedure makes a legend for a plot. The legend can contain
a mixture of symbols, linestyles, Hershey characters (vectorfont),
and filled polygons (usersym).
Examples:
The call:
legend,['Plus sign','Asterisk','Period'],psym=[1,2,3]
produces:
-----------------
| |
| + Plus sign |
| * Asterisk |
| . Period |
| |
-----------------
etc.

Placing an example just after the purpose gives a good oveview of the routine
on the first page of the doc_library output, so the user can exit from IDL's
MORE right away.

The code is simple. All that is needed in the procedure is a single line. For
example,

pro legend,help=help,items,linestyle=linestyle,psym=psym ...
;
; =====>> HELP
;
on_error,2
if keyword_set(help) then begin & doc_library,'legend' & return & endif
...

The method is simple, gives straightforward help, and promotes the inclusion of
headers in all routines.

Fred


In article <thompson.734709026@serts.gsfc.nasa.gov>, thompson@serts.gsfc.nasa.gov (William Thompson) writes:
|> deutsch@orac.stsci.edu writes:
|>
|> >In article <thompson.734294880@serts.gsfc.nasa.gov>, thompson@serts.gsfc.nasa.gov (William Thompson) writes:
|> >> kaij@dutnsi2.tudelft.nl (Roland Kaijen) writes:
|> >>
|> >>>n IDL 3.0.1 for WINDOWS there is very good online help-tool. Unfortunatly
|> >>>only the functions & procedures know by the makers of IDL are in this
|> >>>help-tool; there are however frequently used functions & procedures written
|> >>>by others that we would like to a
|> >>
|> >> Use the routine MK_LIBRARY_HELP in the IDL User's Library.
|> >>
|> >> Bill Thompson
|>
|> > This allows one to create the .HELP files, but what if you are not allowed
|> >to add to the IDL_DIR/help directory? e.g. on a cluster where you are not
|> >the main user of IDL, how can I add .HELP entries (for use with ?)
|> >for me to use, but not for everyone to have to see. Can I set something
|> >somewhere to not only look in the IDL distribution HELP directory, but also
|> >one of my own (or one which applies to a certain package, etc.)
|>
|>
|> The question mark command in IDL actually calls a routine called MAN_PROC. At
|> one point we had editted man_proc.pro to do exactly what you're talking about,
|> but then RSI came out with the widgetized version of "?" and we gave up.
|>
|> Nowadays we depend on another routine called DOC which allows us to browse
|> through the directories in !PATH, and to extract the documentation from it.
|> It's basically a user-friendly front-end to DOC_LIBRARY. The software works
|> best on a widgets platform such as X-windows or Microsoft Windows, but there's
|> also a capability of using it on less sophisticated platforms. If you want
|> this software, please E-mail me and I'll tell you how to get it.
|>
|> If you have widgets available to you (either X-windows or I believe now
|> Microsoft Windows) you can use a routine called XDL, which does more-or-less
|> the same thing as DOC, although somewhat differently. XDL should be supplied
|> with the IDL distribution.
|>
|> Bill Thompson
--
=Fred Knight (knight@ll.mit.edu) (617) 981-2027
C-483\\MIT Lincoln Laboratory\\244 Wood Street\\Lexington, MA 02173
Re: Making help for your own functions & procedures [message #997 is a reply to message #860] Tue, 13 April 1993 06:50 Go to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
deutsch@orac.stsci.edu writes:

> In article <thompson.734294880@serts.gsfc.nasa.gov>, thompson@serts.gsfc.nasa.gov (William Thompson) writes:
>> kaij@dutnsi2.tudelft.nl (Roland Kaijen) writes:
>>
>>> n IDL 3.0.1 for WINDOWS there is very good online help-tool. Unfortunatly
>>> only the functions & procedures know by the makers of IDL are in this
>>> help-tool; there are however frequently used functions & procedures written
>>> by others that we would like to a
>>
>> Use the routine MK_LIBRARY_HELP in the IDL User's Library.
>>
>> Bill Thompson

> This allows one to create the .HELP files, but what if you are not allowed
> to add to the IDL_DIR/help directory? e.g. on a cluster where you are not
> the main user of IDL, how can I add .HELP entries (for use with ?)
> for me to use, but not for everyone to have to see. Can I set something
> somewhere to not only look in the IDL distribution HELP directory, but also
> one of my own (or one which applies to a certain package, etc.)


The question mark command in IDL actually calls a routine called MAN_PROC. At
one point we had editted man_proc.pro to do exactly what you're talking about,
but then RSI came out with the widgetized version of "?" and we gave up.

Nowadays we depend on another routine called DOC which allows us to browse
through the directories in !PATH, and to extract the documentation from it.
It's basically a user-friendly front-end to DOC_LIBRARY. The software works
best on a widgets platform such as X-windows or Microsoft Windows, but there's
also a capability of using it on less sophisticated platforms. If you want
this software, please E-mail me and I'll tell you how to get it.

If you have widgets available to you (either X-windows or I believe now
Microsoft Windows) you can use a routine called XDL, which does more-or-less
the same thing as DOC, although somewhat differently. XDL should be supplied
with the IDL distribution.

Bill Thompson
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL (Interactive Data Language) FAQ
Next Topic: Re: PLOT keywords vs System Variables

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

Current Time: Wed Oct 08 11:32:04 PDT 2025

Total time taken to generate the page: 0.00888 seconds