[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Many procedures, what to do?




Greetings all!

I have about twenty five functions that go into a single larger
library.  They are all pretty much inextricably linked together.  This
is the SAVE file library I have mentioned once or twice, with the
ability to read and write and interogate save files yourself.

Anyway, my question is what to do with all these files?  I would
imagine that for most people, including myself, this many files is a
pain in the neck.  Also they share a lot of the same parameters so it
would be difficult to keep the documentation up to date.

My other option is to merge them into a single file called, say,
CMSVLIB.  There are a couple of problems with that.

First, how to get them compiled.  That's easy, I just require every
program which calls the library to invoke CMSVLIB first.  As long as
there is actually a procedure called CMSVLIB at the end of the file,
this should force all the other routines in the file to be compiled.

The other problem is more subtle.  Since none of the individual files
are compiled when the invoking procedure is compiled, IDL won't know
about the functions.  It will see the round parenthesis of
"cmsv_rlong(block, pointer)" and think it's an array subscript.
Arghh.

Okay, that can be solved by forcing everybody to declare the functions
they use with FORWARD_FUNCTION.  Now it's starting to get annoying
again.  I guess I could rewrite everything to be procedures...

Does anybody else have suggestions, or experiences with something like
this?

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------