Next: Parameter handling
Up: Rickett, et al.: STANFORD
Previous: Introduction
To use the sep module, simply put
use sep
in your program. All operations with parameter and header
files should be enclosed in two subroutine calls:
call sep_init ()
and
call sep_close ()
Essentially, sep_init sep_init
initialize header and parameter interface just calls
initpar, and sep_close sep_close
close header interface calls hclose, but the new names
make them look more like a constructor-destructor pair, typical for
the object-based style of programming. The calls to data access
functions (sep_read and sep_write), described
below, can be placed anywhere in the program.
My typical main-program style is
- 1.
- get parameters
- 2.
- allocate storage
- 3.
- read the input
- 4.
- do processing (sometimes by using other modules)
- 5.
- write the output
- 6.
- free storage
Sometimes it is more convenient to do it in a different order (for
example, when some of your parameters are defined in the processing
step).
An example main program is Clip . Next
sections explain the function interface used in this example.
Next: Parameter handling
Up: Rickett, et al.: STANFORD
Previous: Introduction
Stanford Exploration Project
7/5/1998