Previous: Relationship to Old SUBLIB Up: SUBLIB Subroutine Library Next: Calling Sequences

When to Create a SUBLIB Subroutine

The first thing to ask when thinking about a new SUBLIB subroutine is: Is the routine generally useful? If the program you're writing is the only one that would possibly be interested in the subroutine, then don't put it in SUBLIB. There is a lot of subroutines in the old SUBLIB that are not particularly useful and are not generally used. Try to keep SUBLIB clean by not including subroutines that aren't generally useful.

On the other hand, make sure that anything that is generally useful gets put in SUBLIB. There are a lot of cases of duplicated code in the VICAR system that would benefit from being made generally available in SUBLIB (much of the Magellan software is a good example).

It's really a judgement call as to whether or not the subroutine should go into SUBLIB. The rules haven't really changed with the port to Unix. The port merely allows an opportunity to clean up SUBLIB with minimal impact. Just keep these guidelines in mind when thinking about creating a new SUBLIB routine.

rgd059@ipl.jpl.nasa.gov