next up previous index
Next: Calling COMIS routines from Up: Calling sequences Previous: Entry to COMIS


Calling the user routines

In order to invoke the routines compiled by the user COMIS has to know the address of the called routine. The location of the routine can be passed to the COMIS interpreter through a call to subroutine CSEXT:

CALL CSEXT ('name1.type,...,nameN.type#',name1,...,nameN)

where name1,...,nameN should be declared as EXTERNAL in the Fortran program. Possible values for the type specifier are:

D
for a double precision function;
I
for an integer function;
L
for a logical function;
R
for a real function;
S
for a subroutine;
X
for a complex function.

If the type specifier is omitted, then type subroutine ('.S') is assumed.

Data transmission between Fortran and COMIS routines is done in the usual way using routine parameters and through COMMON blocks. To handle COMMON blocks the interpreter has to know the address of the first element of each such block. This is specified by using subroutine CSCOM as follows:

CALL CSCOM ('name1,...,nameN#',FE1,...,FEN)

FE1,...,FEN are the first elements of the COMMON blocks with names name1,...,nameN. The name $BLANK should be used for the blank COMMON.

The addresses of COMMON blocks which contain character data should be specified with a call to routine CSCOMC, whose calling sequence is similar to CSCOM.


next up previous index
Next: Calling COMIS routines from Up: Calling sequences Previous: Entry to COMIS
Back to CERN | IT | ASD | CERN Program Library Home
MG (last mod. 1998-08-19)