Next: Interaction with FORTRAN programs
Up: gildas-prog
Previous: Routines for Library usage
Contents
Index
Partially updated in Oct 2008. Need more details about loading GreG.
This section describes how GREG normally used as an interactive plot
utility, can also be used as a high level plot library. GREG can be used
exactly as a standard graphic library, but because of the possibilities of
the command line monitor, many other possibilities are accessible.
Before presenting in detail the ``Library Version'' of GREG we should
distinguish between three different possible applications of the GREG Library :
- The occasional user who has a single repetitive graphic problem which
is part of another complex program. Interactive control is not wanted.
This case can often be solved using command procedures and SIC images
as data format when formatted I/O is definitely too slow. This is very
efficient and flexible. If the user already discarded this possibility,
he (she) most likely wants the simplest programming ever possible, will
be satisfied by standard default values, and is not really worried about
optimum efficiency.
- A programmer wanting to solve a single repetitive graphic problem for
use by other people. Interactive action is not wanted. Simple
programming is of little importance, but efficiency is a major problem.
- A programmer wishing to integrate elaborate and flexible graphic
applications as part of a more complete data analysis system. Interactive
control by the user and error recovery are necessary. Then all GREG capabilities are wanted, and in addition this programmer may well be
interested to use the possibilities of the SIC monitor to ``supervise''
the data analysis system.
The library version of GREG allows all three cases to be solved
adequately by offering three different ways to call GREG services :
- Passing a command to GREG using the routine GR_EXEC
GR_EXEC('Command Argument/Option') will execute the command line
exactly as if you had typed it interactively. Instead of GR_EXEC,
it is recommended to use GR_EXEC1, GR_EXEC2 and GR_EXECL
for commands of languages GREG1, GREG2 and GTVL respectively.
- Calling an intermediate formatting routine which generates the
appropriate call to GR_EXEC from its own arguments. Special
entries are used to process possible options.
The advantage of this mode is to provide a more standard program
interface. Not all commands will be accessible in that way, and it is
marginally slower than the previous mode.
- Calling subroutines which do not correspond to GREG commands but
directly generates plot actions. This way is the most optimized access,
since it bypasses the command line interpreter. However, only standard
things can be done like this, and it requires some precautions because of
the segmented nature of the graphic library.
All three ways can be used within a single program, and the choice between
one or the other is just a matter of convenience and/or efficiency.
In addition, the GREG plot library can be used either as a classic
package of subroutines (``Library Only''), or as an interactive facility
allowing user control at run time by means of the SIC monitor
possibilities (``Interactive''). The two modes can be mixed in a
subroutine, with the important restriction that the ``Library Only'' mode
is just a subset of the ``Interactive'' mode. It is not possible to change
the mode during program execution. A program using GREG plot library in
``Interactive'' mode in fact appears as a superset of the GREG interactive utility.
Subsections
Next: Interaction with FORTRAN programs
Up: gildas-prog
Previous: Routines for Library usage
Contents
Index
Gildas manager
2014-07-01