Keywords: gildas-prog

Next: Basic Routines Up: GreG Programming Manual Previous: GreG Programming Manual Contents Index

# Interaction with FORTRAN programs

For a normal user, it can be said that GREG does not interfere at all with a `FORTRAN` program. All interactions with a program concern the system or SIC facilities as detailed below.

- I/O Units :
  All logical units used by the GREG system and the associated SIC monitor are FORTRAN units between 50 and 99. Programs using SIC should avoid opening such units, or should get available units through calls to `SIC_GETLUN`.
- Work Space :
  GREG uses as much as possible the concept of virtual memory. This means that work space, when required, is allocated dynamically at run time. Hence, GREG does not overload a small program. There is currently one exception, the X,Y and Z buffers which have a fixed size allocation of 10000 long-words each. This may change at some time. On large applications, be sure that your virtual memory quota is large enough. Be sure also to run GREG in a large enough working set to reduce page faults.
- Special Handler :
  The SIC monitor always traps the `^C` action to provide a facility to interrupt procedures at any time. You can bypass this action by adequate programming (see `SIC_CTRLC` routine in the SIC manual).

Programmers using SIC as command monitor together with GREG either in interactive or in library mode, should be aware of the interaction between GREG and SIC command parsing facility. Each call to `GR_EXEC, GR_EXEC1, GR_EXEC2, GR_EXECL or EXEC_GREG` parses at least one GREG command line, and thus modify the pointers accessed by SIC argument retrieving routines. Accordingly, any subroutine implementing a user command should retrieve all its arguments before calling a GREG subroutine.

Next: Basic Routines Up: GreG Programming Manual Previous: GreG Programming Manual Contents Index