Re: library help -- multiple procedures in one file [message #30948 is a reply to message #30945] |
Fri, 24 May 2002 11:04   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
"Liam E. Gumley" wrote:
>
> Chris O'Dell wrote:
>>
>> This question is mostly aimed at people who build libraries for public
>> use (David, Craig, etc). I am putting together a lot of the little
>> useful routines I have written as a grad student into a library, and was
>> wondering, should I juse make EVERY procedure/function have its own
>> file? In PASCAL, I was a big proponent of nested functions;
>> functions/procedures really ONLY used by one other procedure or
>> function. But in IDL, those functions aren't compiled on the fly and
>> you have to open the darn function file and compile them all every time
>> you start idlde. Is there any way around this?
>>
>> Cheers,
>> Chris
>
> My preferences:
>
> - One function or procedure per source file,
> - All lower case file names,
> - UNIX formatting (CR/LF) for newlines,
> - Compressed tar files for UNIX users,
> - ZIP files for Win/Mac users,
> - Available via HTTP.
>
> The only exception to the one function or procedure per file rule would
> be if you have several tightly coupled routines that naturally belong
> together, such as the definition of an object and it's methods.
>
I will add normally tar.gz files could be used by windows users
or on the other hand zip on unix systems too.
So it is better to store them in only one type.
If you work with a library some or many of the routines are
using some other routines.
I decided for a few years to be able to make packages for
each routine which might be intersting to someone. Because
someone may like to do a peak into something and sometimes
it's complicated to download a whole library and then to
implement this in an existing library.
Because normally basic things got same names but differnt functionality.
e.g. colorbar
We designed a routine which founds all dependencies of a given routine.
All routines used by one routine are stored into a tar.gz file.
;
; PURPOSE:
; This procedure founds all dependent routines from a given routine.
They are saved into a tar.gz file
; Additional Informations about the routines are saved into an html
file.
;
If you often change pathes of routines have a look on the /refresh
keyword!
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/tar_gz_dependencies.tar.gz
The path where you have extracted these file must be set into !PATH e.g.
!PATH=!PATH+':'+'/idl/targz'
because this routine changes the path during executing.
If you like you cn do a peak in our library
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/idl_work_libraries.htm
or on the database of
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/tar_gz_dependencies_dbase.pro.html
If you have binaries of the routines they can be called by idl -rt=file
For example take a peak at x_digisym
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/x_digisym.sav
regards
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
|
|
|