Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.

  >  Docs Center  >  Using IDL  >  Advice for Library Authors


Advice for Library Authors

Advice for Library Authors

The structure and organization of the library needs to encourage reuse and generality.

Library code must be more robust than the usual program. Stability of implementation, and especially of interface, are very important.

Errors must be gracefully handled whenever possible. See Debugging and Error‑Handling for more on error control.

The most useful libraries are written to work correctly on a wide variety of platforms, without requiring their users to be aware of the details.

Libraries must be able to co-exist with other code over which they have no control. Authors must not alter the global environment in ways that cause conflicts, and they must also take care to prefix the names of all routines, common blocks, systems variables, and any other global resources they use. This prevents a library from conflicting with other libraries on the same system, and protects the library from changes to IDL that may occur in newer releases.

Prefixing Routine Names

The use of a proper prefix minimizes the risk of a namespace collision as described in Recognizing Potential Naming Conflicts. In selecting a prefix for your library, you should select a name that is short, mnemonic, and unlikely to be chosen by others. For example, such a name might use the name of your organization or project in an abbreviated form.

Non-prefixed names and names prefixed by “IDL” are reserved. New names of these forms can and will appear without warning in new versions of IDL, and should be avoided when naming new library routines.

© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us