                        Copyright 'Fortran Friends' D.J. and K.M. Crennell 15 Feb 93

%ABS
 FUNCTION ABS (arg)
     Returns the absolute value of the argument which may
 be real or complex.
 The result is the same precision as the argument, and
 for complex argument (x,y) takes the value
 SQRT(x**2 + y**2)

 See also the IABS intrinsic function.
%ACCEPT
 ACCEPT f[,iolist] or ACCEPT *[,iolist]
 This ia a VMS extension which does the same as READ
but always from the standard input stream.
 f is a FORMAT number or * for list-directed input.

Thus:
      ACCEPT 101,NAME
 does the same as
      READ(5,101)NAME
reading the variable 'NAME' from the input stream under the
control of
  101 FORMAT(...)
%ACOS
 FUNCTION ACOS (arg)
     Returns the arccosine of the argument in radians
 from 0 to pi.

 Argument and result must both be either single or double
 precision.

 The absolute value of the argument must be less than or
 equal to 1.
%ACOSH
 FUNCTION ACOSH (arg)
     Returns the inverse hyperbolic cosine of the argument

 Argument and result must both be single precision.

 The value of the argument must be greater than or
 equal to 1.
 The positive result is presented (the negative is equally valid)
%AIMAG
 REAL FUNCTION AIMAG (complex*8-arg)
     Returns the imaginary part of a complex number.
%AINT
 FUNCTION AINT (real-arg)
     Returns the largest integer whose absolute value
 does not exceed the absolute value of the argument and
 has the same sign as the argument.

 Argument and result must both be either single or double
 precision.

 See also the INT intrinsic function.
%ALOG
 REAL FUNCTION ALOG (real*4-arg)
     Returns the natural logarithm (to base e) of the
 argument

 The argument must be greater than zero.
%ALOG10
 REAL FUNCTION ALOG10 (real*4-arg)
     Returns the logarithm to base 10 of the argument

 The argument must be greater than zero.
%AMAX0
 REAL FUNCTION AMAX0 (integer, integer, ...)
     Returns the largest of the values in the argument
 list.

 See also the MAX intrinsic function.
%AMAX1
 REAL FUNCTION AMAX1 (real*4-arg1, real*4-arg2, ...)
     Returns the largest of the arguments.
%AMIN0
 REAL FUNCTION AMIN0 (integer, integer, ...)
     Returns the smallest of the values in the argument
 list.

 See also the MIN intrinsic function.
%AMIN1
 REAL FUNCTION AMIN1 (real*4-arg1, real*4-arg2, ...)
     Returns the smallest of the arguments.
%AMOD
 REAL FUNCTION AMOD (real*4-dividend, real*4-divisor)
     Returns the remainder after dividing dividend by
 divisor

 I.e.= dividend - divisor * integral part of
 (dividend / divisor)
%ANINT
 FUNCTION ANINT (real-arg)
 Returns the value of the integer nearest to that of the
 argument.

 Argument and result must both be single or double
 precision.
%ASIN
 FUNCTION ASIN (real-arg)
     Returns the arcsine of the argument in radians from
 -pi/2 to +pi/2.

 Argument and result must both be either single or double
 precision.

 The absolute value of the argument must be less than or
 equal to 1.
%ASINH
 FUNCTION ASINH (arg)
     Returns the inverse hyperbolic sine of the argument

 Argument and result must both be single precision.
%ASSIGN
      ASSIGN statement# TO iv
   Assigns the value of a statement label to an integer
 variable which can then be used in statements like:
      GOTO iv
 or
      PRINT iv,...
%ATAN
 FUNCTION ATAN (real-arg)
     Returns the arctangent of the argument in radians
 from -pi/2 to +pi/2.

 Argument and result must both be single or double
 precision.
%ATAN2
 FUNCTION ATAN2 (y,x)
     Returns the angle of the 2-d vector (x,y) in radians
 from -pi to +pi.

 Arguments and result must all be either single or double
 precision.
%ATANH
 FUNCTION ATANH (arg)
     Returns the inverse hyperbolic tangent of the argument

 Argument and result must both be single precision.
 The argument must be in the range -1.0 < arg < +1.0
%BACKSPACE
   BACKSPACE([UNIT=]iunit[,ERR=statement#][,IOSTAT=ios])
 or
   BACKSPACE iunit
   Backspaces the file on unit 'iunit' by one record

 On finding an error, control passes to 'statement#'

 Returns 'ios', the completion status (=0 if OK)

 ** BACKSPACE is NOT implemented in Fortran77 release 2
%BLOCKDATA
      BLOCK DATA [name]
   Introduces a procedure which is exclusively used for
 initializing COMMON variables. It must not have any
 executable statements, and can only include the
 statements:
   COMMON, DATA, DIMENSION, EQUIVALENCE, IMPLICIT,
 PARAMETER, and SAVE
 and is terminated by END
%BTEST
 LOGICAL FUNCTION BTEST (IVAL,IBIT)
  Inspects the bit in integer IVAL at bit position IBIT,
 (0 is the least significant, 31 the most).
  Returns .TRUE. if the bit is 1, .FALSE. if it is zero.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%CABS
 REAL FUNCTION CABS (complex*8-arg)
     Returns the magnitude of the argument.
 This is SQRT(x**2 + y**2) for the complex number (x,y)
%CALL
      CALL subroutine[([arg1][,[arg2]]...)]
   Transfers control and passes optional arguments to a
 subroutine.
%CCOS
 COMPLEX*8 FUNCTION CCOS (complex*8-arg)
     Returns the cosine of the argument which is in
 radians.
%CDABS
 DOUBLE PRECISION FUNCTION CDABS (complex*16-arg)
     Returns the magnitude of the argument.
 This is SQRT(x**2 + y**2) for the complex number (x,y)

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CDATE

 CALL CDATE( STRING )

 Purpose: returns the current date and time as an ASCII character string.
                             
 Parameter:
 
  STRING - CHARACTER of length at least 25, returns with:
         
    STRING(1:24) filled with the current date and time in the format:

         ddd,nn mmm yyyy.hh:mm:ss

    where 'ddd' is a three-character abbreviation for the day;
          'nn mmm yyy' is the date, and 'hh:mm:ss' the time. 

    STRING(25:25) is [0D] an ASCII 13 (a Carriage Return character).

 Errors: if the length of STRING is less than 25, the subroutine does
         nothing.

 Example:
      CHARACTER*25 TODAY
      CALL CDATE(TODAY)
      PRINT *,TODAY
 Results in: Sat,28 Nov 1992.16:28:55
  (or similar)
%CDCOS
 COMPLEX*16 FUNCTION COS (complex*16-arg)
     Returns the cosine of the argument which is in
 radians.

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CDEXP
 COMPLEX*16 FUNCTION CDEXP (complex*16-arg)
     Returns e to-the-power of the argument.

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CDLOG
 COMPLEX*16 FUNCTION CDLOG (complex*16-arg)
     Returns the natural logarithm (to base e) of the
 argument

 The argument must not be (0.,0.).

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CDSIN
 COMPLEX*16 FUNCTION CDSIN (complex*16-arg)
     Returns the sine of the argument which is in
 radians.

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CDSQRT
 COMPLEX*16 FUNCTION CDSQRT(complex*16-arg)
     Returns the square root of the argument.

 The result is the principal value, with the real part
 greater than or equal to zero. If the real part is zero,
 the result is the principal value, with the imaginary
 part greater than or equal to zero.

 COMPLEX*16 is a non-standard Fortran77 variable type.
%CEXP
 COMPLEX*8 FUNCTION CEXP (complex*8-arg)
     Returns e to-the-power of the argument.
%CHAR
 CHARACTER FUNCTION CHAR (integer)
     Returns the single character with numeric
 representation given by the integer argument (0 to 255).
%CLOG
 COMPLEX*8 FUNCTION CLOG (complex*8-arg)
     Returns the natural logarithm (to base e) of the
 argument

 The argument must not be (0.,0.).
%CLOSE
      CLOSE([UNIT=]iunit[,STATUS=d]
            [,ERR=statement#][,IOSTAT=ios])
   Closes the file on logical unit 'iunit'.

 d is the state of the file after closing, and can be
 'KEEP' or 'DELETE'
 with the obvious meaning. This overrides any status
 defined in an OPEN statement.

 On finding an error, control passes to 'statement#'

 Returns 'ios', the completion status (=0 if OK)
%CMPLX
 COMPLEX*8 FUNCTION CMPLX (arg1 [,arg2])
     Returns the complex number created from the one or
 two arguments.
 The first argument forms the real part of the result;
 the second, if it exists, forms the imaginary part which
 is otherwise set to zero.

 The arguments may be integer, real*4 or real*8
%COMMON
      COMMON [/[name1]/]list1[[,]/[name2]/list2]...
   Defines one or more contiguous blocks of storage which
 can then be available to any procedure, simply by
 including the same COMMON reference in each routine. The
 statement must precede any executable statements.

 'name' is a unique identifier for the common block.

 'list' is a list of variable or array names, separated
        by commas, to be put in the block.

 Blank COMMON is one with a null name, or even has the //
 omitted.
%CONJG
 COMPLEX FUNCTION CONJG (complex-arg)
     Returns the complex conjugate of the argument:
 (X,Y) => (X,-Y)

 Argument and result must both be either single or double
 precision.
%CONTINUE
      CONTINUE
   Does nothing, but is useful for labelling the end of a
 DO loop.
%COS
 FUNCTION COS (arg)
     Returns the cosine of the argument which is in
 radians.

 Argument and result must both be either single or double
 precision, real or complex.
%COSH
 FUNCTION COSH (real-arg)
     Returns the hyperbolic cosine of the argument.

 Argument and result must both be either single or double
 precision.
%CPU
 REAL FUNCTION CPU(TIME)
  Returns CPU time (in seconds) used since TIME
  Argument
   TIME   REAL*4 time in seconds from the last call
          or 0.0 for the first call
%CSIN
 COMPLEX FUNCTION CSIN (complex*8-arg)
     Returns the sine of the argument which is in
 radians.
%CSQRT
 COMPLEX*8 FUNCTION CSQRT (complex*8-arg)
     Returns the square root of the argument.

 The result is the principal value, with the real part
 greater than or equal to zero. If the real part is zero,
 the result is the principal value, with the imaginary
 part greater than or equal to zero.
%DABS
 DOUBLE PRECISION FUNCTION DABS (real*8-arg)
      Returns the absolute value of the argument.
%DACOS
 DOUBLE PRECISION FUNCTION DACOS (real*8-arg)
      Returns the arc cosine of the argument in radians
 from 0 to pi.
 The absolute value of the argument must be less than or
 equal to 1.
%DACOSH
 DOUBLE PRECISION FUNCTION DACOSH (arg)
     Returns the inverse hyperbolic cosine of the argument

 Argument and result must both be double precision.

 The value of the argument must be greater than or
 equal to 1.0D0
 The positive result is presented (the negative is equally valid)
%DASIN
 DOUBLE PRECISION FUNCTION DASIN (real*8-arg)
     Returns the arcsine of the argument in radians from
 -pi/2 to +pi/2.

 The absolute value of the argument must be less than or
 equal to 1.
%DATA
      DATA vlist1/values1/[[,]vlist2/values2/]...
   Initializes variables in 'vlist' with 'values', when
 the program is loaded. It must come after declaration
 statements like COMMON, and before any executable
 statements.

 'vlist' is a list of names of variables, arrays, or
         array elements, and can contain implied DO
         loops; e.g.
      DATA (A(I),I=2,5),KK/2.,3.,4.,5., 10/

 'values' is a list of values to be stores in the vlist
          variables. It must have the same number of
          values as 'vlist'.
 Values can be repeated n times by preceding the value
 with n*, e.g.
      DIMENSION AA(1000)
      DATA AA/1000*0.0/
 initializes all of AA to zero.
%DASINH
 DOUBLE PRECISION FUNCTION DASINH (arg)
     Returns the inverse hyperbolic sine of the argument

 Argument and result must both be double precision.
%DATAN
 DOUBLE PRECISION FUNCTION DATAN (real*8-arg)
     Returns the arctangent of the argument in radians
 from -pi/2 to +pi/2.
%DATAN2
 DOUBLE PRECISION FUNCTION DATAN2 (y,x)
     Returns the angle of the 2-d vector (x,y) in radians
 from -pi to +pi.
 The arguments, x & y must be of type DOUBLE PRECISION.
%DATANH
 DOUBLE PRECISION FUNCTION DATANH (arg)
     Returns the inverse hyperbolic tangent of the argument

 Argument and result must both be double precision.
 The argument must be in the range -1.0D0 < arg < +1.0D0
%DBLE
 DOUBLE PRECISION FUNCTION DBLE (arg)
     Converts the argument into a REAL*8 value. The
 argument may be integer, real or complex of either
 precision.
%DCMPLX
 COMPLEX*16 FUNCTION DCMPLX (arg1 [,arg2])
     Returns the complex number created from the one or
 two arguments.
 The first argument forms the real part of the result;
 the second, if it exists, forms the imaginary part which
 is otherwise set to zero.

 The arguments may be integer, real*4 or real*8

 COMPLEX*16 is a non-standard Fortran77 variable type.
%DCONJG
 COMPLEX*16 FUNCTION DCONJG (complex*16-arg)
     Returns the complex conjugate of the argument:
 (X,Y) => (X,-Y)

 COMPLEX*16 is a non-standard Fortran77 variable type.
%DCOS
 DOUBLE PRECISION FUNCTION DCOS (real*8-arg)
     Returns the cosine of the argument which is in
 radians.
%DCOSH
 DOUBLE PRECISION FUNCTION DCOSH (real*8-arg)
     Returns the hyperbolic cosine of the argument.
%DECODE
 DECODE (c,f,string[,IOSTAT=ios][,ERR=s] [list]
 This VMS extension performs the same function as
 READ (string,f[,IOSTAT=ios][,ERR=s] [list]
to decode variables in CHARACTER string in FORMAT f
to a list. c is the number of characters used in string 
%DEXP
 DOUBLE PRECISION FUNCTION DEXP (real*8-arg)
     Returns e to-the-power of the argument.
%DFLOAT
 DOUBLE PRECISION FUNCTION DFLOAT (integer)
     Converts an integer into a REAL*8 value.
%DIM
 FUNCTION DIM (arg1, arg2)
     Returns the absolute value of the difference between
 the arguments.

 Arguments and result must all one of integer, single or
 double precision.
%DIMAG
 DOUBLE PRECISION FUNCTION DIMAG (complex*16-arg)
     Returns the imaginary part of a complex number.

 COMPLEX*16 is a non-standard Fortran77 variable type.
%DIMENSION
      DIMENSION array1([i1:]j1[,[k1:]l1]..)
              [,array2([i2:]j2[,[k2:]l2]..)]...
   Defines the number of dimensions in an array and the
 number of elements in each dimension.

 'array1' etc are names for the array

 '[i1:]j1' etc. give the (optional) lower and upper index
           bound for each dimension of the array. If
           omitted, the lower bound is assumed to be 1.

 E.g.
      DIMENSION AA(0:9,0:9),KS(10)
 defines two arrays: the first called AA which has 10x10
 elements with each dimension indexed from 0 to 9, and KS
 singly dimensioned with 10 elements indexed from 1 to 10
%DINT
 DOUBLE PRECISION FUNCTION DINT (real*8-arg)
     Returns the largest integer whose absolute value
 does not exceed the absolute value of the argument and
 has the same sign as the argument.
%DLOG
 DOUBLE PRECISION FUNCTION DLOG (real*8-arg)
     Returns the natural logarithm (to base e) of the
 argument

 The argument must be greater than zero.
%DLOG10
 FUNCTION DLOG10 (real*8-arg)
     Returns the logarithm to base 10 of the argument

 The argument must be greater than zero.
%DMIN1
 DOUBLE PRECISION FUNCTION DMIN1 (real*8-arg1,
                                  real*8-arg2, ...)
     Returns the smallest of the arguments.
%DMAX1
 DOUBLE PRECISION FUNCTION DMAX1 (real*8-arg1,
                                  real*8-arg2, ...)
     Returns the largest of the arguments.
%DMOD
 DOUBLE PRECISION FUNCTION DMOD (real*8-dividend,
                                 real*8-divisor)
     Returns the remainder after dividing dividend by
 divisor

 I.e.= dividend - divisor * integral part of
 (dividend / divisor)
%DNINT
 DOUBLE PRECISION FUNCTION DNINT (real*8-arg)
     Returns the value of the integer nearest to that of
 the argument.
%DO
      DO [statement#[,]] var = start,finish[,step]
   Executes a block of statements repeatedly with the
 value of the variable 'var' changing from 'start' to
 'finish' with a step size 'step' (default =+1).
 If the range 'start' to 'finish' is not an integral
 multiple of 'step', the loop will terminate when var
 becomes outside the range.

 The block of statements can either be terminated at an
 instruction labelled with the 'statement#', or by an
 ENDDO instruction, when 'statement#' is not in the DO
 statement.

 Under Fortran 77 rules, the statements in the block will
 not be executed if 'finish - start' is not zero, and
 does not have the same sign as 'step'. Under Fortran 66
 rules, a DO loop is always executed at least once.
%DPROD
 DOUBLE PRECISION FUNCTION DPROD(real*4-arg,
                                 real*4-arg)
     Returns the double precision product of two single
 precision arguments.
%DREAL
 DOUBLE PRECISION FUNCTION DREAL (complex*16-arg)
     Returns the real part of a complex number.
%DSIN
 DOUBLE PRECISION FUNCTION DSIN (real*8-arg)
     Returns the sine of the argument which is in
 radians.
%DSIGN
 DOUBLE PRECISION FUNCTION DSIGN (real*8-value,
                                  real*8-sign)
     Returns the magnitude of the first argument, with
 the sign of the second.
%DSINH
 DOUBLE PRECISION FUNCTION DSINH (real*8-arg)
     Returns the hyperbolic sine of the argument.
%DSQRT
 DOUBLE PRECISION FUNCTION DSQRT (real*8-arg)
     Returns the square root of the argument.
 The argument must be greater or equal to zero.
%DTAN
 DOUBLE PRECISION FUNCTION DTAN (real*8-arg)
     Returns the sine of the argument which is in
 radians.
%DTANH
 DOUBLE PRECISION FUNCTION DTANH (real*8-arg)
     Returns the hyperbolic tangent of the argument.
%ELSE
      ELSE
 Causes the following block of statements (up to an ENDIF
 statement) to execute if no preceding statement block in
 the 'block IF' construction was executed.
%ELSEIF
      ELSEIF (expr) THEN
 Causes the following block of statements to execute if
 no preceding statement block in the 'block IF'
 construction was executed, and if the logical expression
 'expr' is true.

 The statement block is terminated by ELSE, ELSEIF or
 ENDIF.
%ENCODE
 ENCODE (c,f,string[,IOSTAT=ios][,ERR=s] [list]
 This VMS extension performs the same function as
 WRITE (string,f[,IOSTAT=ios][,ERR=s] [list]
to encode variables in list to the CHARACTER string
in FORMAT f
c is the number of characters used in string 
%END
      END
   Indicates the end of a procedure.
 Be careful to put a <return> after the last END
 statement in a file, otherwise it will not be seen by
 the compiler!
%ENDDO
      ENDDO
 Terminates the block of statements following a DO or DO
 WHILE statement when a label is not used.
%ENDFILE
     ENDFILE([UNIT=]iunit[,ERR=statement#][,IOSTAT=ios])
 or
     ENDFILE iunit
  writes a special record in the physical file which is
  interpreted on reading and can be detected by IOSTAT=-2
 (rather than IOSTAT=-1 for the physical end of the file).
 You can read beyond this type of end-of-file marker;
 it counts as a record if you then BACKSPACE over it.
      CALL FLSKIP(NUNIT,IEOF)
 skips the rest of the file. It returns IEOF:

 > 0  if the file is not open or is illegal in any way

 =-1  for physical end of file detected

 =-2  for logical end-of-file (as described above) and
 positions the file for reading after the marker.

 On finding an error, control passes to 'statement#'
   or
 Returns 'ios', the completion status (=0 if OK)
%ENDIF
      ENDIF
   Terminates a block IF construction.
%ENDWHILE
      ENDWHILE
   Terminates a WHILE loop block of instructions, (see
 WHILE).
%ENTRY
      ENTRY name[([arg1[,arg2]...])]
   An alternate entry point at which to start execution
 of a subprogram. It must not be within a DO loop or a
 block IF construction.

 'name' is a symbolic name for the entry point.

 In a function subprogram, the data type of the ENTRY
 name should be the same as that of the function itself,
 and if it is of type CHARACTER, be of the same length.

 'arg1' etc. are dummy arguments or alternate return
        arguments (preceded by an asterisk).
 The arguments need not agree in name, order, number, or
 type with the dummy arguments in the SUBROUTINE or
 FUNCTION statement for the subprogram.
 Be careful to use only the dummy arguments which have
 been defined.
%EQUIVALENCE
      EQUIVALENCE (list1)[,(list2)]...
   Starts two or more variables or arrays at the same
 storage location, thus overlaying them in memory.  When
 an array or substring element is equivalenced, the
 entire array or string is equivalenced in its normal
 linear storage.

 'list1' etc. are lists of variable or array element
         names separated by commas.
 E.g. EQUIVALENCE ( A(1,2), X, I(7))

 The following elements can not be equivalenced:
 a) Two elements from the same or different COMMON
 blocks,
 b) A CHARACTER element with a non-CHARACTER element.
 c) Dummy arguments of a subprogram.
%EXP
 FUNCTION EXP (arg)
     Returns e to-the-power of the argument.

 Argument and result must both be either single or double
 precision, real or complex.
%EXTERNAL
      EXTERNAL sub1[,sub2]...
   Specifies that a name is a global symbol defined
 outside the current procedure. It is usually used to
 identify subprogram or entry point names which will
 passed as arguments. E.g.
      EXTERNAL MARY,JANE
      ...
      CALL FRED(MARY)
      ...
      CALL FRED(JANE)
 tells FRED to use subroutines (or functions) MARY and
 then JANE in its calculations.

 There is no need to define references to called
 subroutines or functions with an EXTERNAL statement.

 'sub1' etc. are the names of the routines defined
        outside this procedure.
%FFSIZE
  CALL FFSIZE(NUNIT,NWR,JREC,ISTAT)
   Finds size of a direct access file
 Parameters:
  NUNIT - Integer Fortran stream number
  NWR   - input number of words per record
  JREC  - returned number of records in file
  ISTAT - status =0 for OK, =1 file not open
%FLGETP
  CALL FLGETP(NUNIT,INDX)
   Finds current position in a file
 Parameters:
  NUNIT - Fortran stream number
  INDX  - returned byte position in the file.
          or -1 if file is not open
Use FLSETP to set the current position in a file.
%FLSETP
  CALL FLSETP(NUNIT,INDX)
   Sets current position in a file
 Parameters:
  NUNIT - Fortran stream number
  INDX  - new byte position in the file.
          does nothing if the file is not open
          or INDX is outside the file length
Use FLGETP to find a set of indices for records,
then FLSETP to return to a known record.
%FLSKIP
  CALL FLSKIP (NUNIT,IERR)
   Skips to the end if file
 Parameters:
  NUNIT - Fortran stream number
  IERR  - error number
          >0 error
          -1 physical end-of-file
          -2 logical end-of-file (positions file after it)
%FLOAT
 REAL FUNCTION FLOAT (integer)
     Converts the integer argument to a REAL*4 value.
%FORMAT
label FORMAT (field-specifier[,...])
   Defines how data are converted from/to their ASCII
 representation during formatted input/output.

 The statement 'label' identifies the format statement.

 The field specifiers, separated by a comma or a / are
 usually of the form:
    nFw, where n is a repeat count, F a format,
         and w a width in characters.

 The separators are:
   ,   which means the next field continues on the same
       line/record
   /   which means the next field continues on the next
       line/record

 The format codes are:

  For integer variables:
   nIw[.m]  decimal conversion. The ASCII data are right
            justified and blank filled. If m is
            specified on output, at least m digits are
            written, with zero fill.
   nZw[.m]  hexadecimal conversion. The width, w, must
            be even so that complete bytes are
            transferred. This conversion is not in the
            Fortran 77 standard.
   nBw[.m]  binary conversion. This conversion is not
            in the Fortran 77 standard.
   nOw[.m]  octal conversion. This conversion is not
            in the Fortran 77 standard.

  For Logical variables:
   nLw      translates to/from the letters T or F. On
            output, these are right justified.

  For real and complex variables:
            (complex variables just require twice as
            many fields)
   nFw.d   nEw.d[Ee]   nDw.d   nGw.d[Ee]
            on input (where the E descriptor is not used)
            the formats are all translated the same way
            with a default decimal point assumed after
            w-d characters if there is none in the
            string; a D or an E in the string separates
            the mantissa (which must include a decimal
            point) from the decimal exponent.

            Output is written with d decimal places.
            The D and E conversions include an exponent
            (E or D) with e digits. The G conversion uses
            the exponential form if the number is outside
            the printable range.

  For character variables:
   nA[w]    if w is omitted, the external representation
            is assumed to be the same length as the
            CHARACTER string.
            Hollerith data may also be transferred this
            way which provides an easy method of
            transferring non-printing data.

  Fixed output data:
   nH...     send the n characters following the H
   '...'     send the characters inside the quotes

  Editing instruction codes:
    BN       ignore all blanks when inputting numeric
             data
    BZ       treat all blanks as zeros when inputting
             numeric data (default)
   nP        move the decimal point n positions to the
             left in all subsequent real data transfers.
             Negative values of n are allowed.
    S        restores the optional + sign on numeric
             output
    SP       forces a + sign on positive numeric output
    SS       suppress the + sign on positive numeric
             output
    Tn       tab to character n in the record
    TLn      tab left relative to current position
    TRn      tab right relative to current position
   nX        skip n characters
    :        terminates format control if I/O list is
             finished
%FUNCTION
      [type] FUNCTION name[*m][([par1[,par2]...])]
   Begins a function subprogram.

 'type' is an optional data type. E.g. CHARACTER*6 or
        DOUBLE PRECISION
 'name' is its symbolic name
 'par1' etc. are unsubscripted variable names specifying
        dummy arguments.
 '*m'   optional length of a CHARACTER function
%GOTO
1)    GOTO statement#
    Transfers control to the statement labelled with
 'statement#'

2)    GOTO (s1[[,s2]...])[,]index
    Computed GO TO transfers control to one of the
 statements: s1, s2 etc. depending on whether 'index' is
 1, 2, etc. If 'index' is outside the possible range, no
 action is taken.

3)    GOTO link [(s1[[,s2]..)]
   Assigned GO TO transfers control to the statement
 'link' which has been set up in a previous ASSIGN
 statement.
%GO TO
1)    GO TO statement#
    Transfers control to the statement labelled with
 'statement#'

2)    GO TO (s1[[,s2]...])[,]index
    Computed GO TO transfers control to one of the
 statements: s1, s2 etc. depending on whether 'index' is
 1, 2, etc. If 'index' is outside the possible range, no
 action is taken.

3)    GO TO link [(s1[[,s2]..)]
   Assigned GO TO transfers control to the statement
 'link' which has been set up in a previous ASSIGN
 statement.
%IAND
 INTEGER FUNCTION IAND (int1, int2)
     Returns the logical 'and' of the two integer
 arguments.

 I.e. each bit of the result is set to 1 if the
 corresponding bits in both arguments are 1, whereas if
 either is 0, then the result bit is set 0.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%IBCLR
 INTEGER FUNCTION IBCLR (IVAL,IBIT)
     Returns the argument IVAL, with bit IBIT set to 0,
 (0 is the least significant bit, 31 the most).

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%IBITS
 INTEGER FUNCTION IBITS(IA,J,NBITS)
 extracts a set of NBITS contiguous bits from word IA
 starting at J 
%IBSET
 INTEGER FUNCTION IBSET (IVAL,IBIT)
     Returns the argument IVAL, with bit IBIT set to 1,
 (0 is the least significant bit, 31 the most).

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%ICHAR
 INTEGER FUNCTION ICHAR (character)
 Returns the ASCII value of the argument, a character
 expression of length 1
%IDIM
 INTEGER FUNCTION DIM (int1, int2)
     Returns the absolute value of the difference between
 the integer arguments.
%IDINT
 INTEGER FUNCTION IDINT (real*8-arg)
     Returns the largest integer whose absolute value
 does not exceed the absolute value of the argument and
 has the same sign as the argument.
%IDNINT
 INTEGER FUNCTION IDNINT (real*8-arg)
      Returns the integer value nearest to the value of
 the argument.
%IEOR
 INTEGER FUNCTION IEOR (int1, int2)
     Returns the exclusive 'OR' of the two integer
 arguments.
 I.e. each bit of the result is set to 1 if the
 corresponding bits in the two arguments differ, whereas
 if they are the same, then the result bit is set 0.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%IF
1)    IF (expr) s1,s2,s3
   Transfers control to statements s1, s2, or s3
 depending on whether the  value of 'expr' is negative,
 zero, or positive.

2)    IF (logic) statement
   Executes 'statement' if the logical expression is
 true.

3)    IF (logic) THEN
   Executes the following block of statements if the
 logical expression is true. The block must be terminated  by one of ELSE, ELSEIF or ENDIF.
%IFIX
 INTEGER FUNCTION IFIX (real*4-arg)
     Returns the largest integer whose absolute value
 does not exceed the absolute value of the argument and
 has the same sign as the argument.
%IMPLICIT
1)    IMPLICIT type1(a1[,a2]...)
             [,type2(a3[,a4]...)]...
   Defines implicitly the type of all variables beginning
 with specified letters.

 'type1' etc. are data types of all variables beginning
         with the letters 'a1' etc.
 Alternatively, 'a1' may define a range of letters,
   e.g.
      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
 redefines all variables, which would be REAL*4 by
 default, to be REAL*8.

2)    IMPLICIT NONE
   Overrides all the implicit defaults of Fortran, hence
 all variables used must be typed explicitly.

   The IMPLICIT statements should be the first in any
 procedure.
%INCLUDE
      INCLUDE 'filename'
   Includes the contents of the selected file in the code
 at this point.

 The filename should include as much of the complete path
 as is necessary.
%INDEX
 INTEGER FUNCTION INDEX (string, substring)
     Searches for 'substring' in 'string' and returns a
 pointer to the first occurrence, or zero if 'string'
 does not contain 'substring'. The arguments are
 character variables.
%INQUIRE
1)    INQUIRE(FILE=filename,list)
   Returns information about the file 'filename'.

 'list' is a comma separated list which can contain:
    EXIST=logical     returns .TRUE. if the file exists

 If the file has been opened, the CHARACTER variable is
 set to 'YES','NO' or 'UNKNOWN' by the following entries:
    DIRECT=dir      dir set 'YES' for direct access files
    SEQUENTIAL=seq  seq set 'YES' for sequential files
    FORMATTED=for   for set 'YES' for formatted files
    UNFORMATTED=unf unf set 'YES' for unformatted files  

2)    INQUIRE ([UNIT=]iunit,list)
   Returns information about the file attached to logical
 unit 'iunit'.
 'list' is a comma separated list which can contain:
    EXIST=logical   returns .TRUE. if the unit number
                    is valid.

 If the file is being used in the following modes, the
 CHARACTER variable is set to 'YES' 'NO' or 'UNKNOWN' by
 the following entries:
    DIRECT=dir      dir set 'YES' for direct access files
    SEQUENTIAL=seq  seq set 'YES' for sequential files
    FORMATTED=for   for set 'YES' for formatted files
    UNFORMATTED=unf unf set 'YES' for unformatted files  

 There are many other variables which may or may not be
 useable in INQUIRE
%INT
 INTEGER FUNCTION INT (arg)
     Returns the largest integer whose absolute value
 does not exceed the absolute value of the argument and
 has the same sign as the argument.

 The argument may be real or complex, and of either
 precision.
 If it is complex, only the real part is used.
%INTRINSIC
      INTRINSIC func1[,func2]...
 Specifies symbolic names of intrinsic subprograms to be
 used as arguments in called subprograms.

 'func1' etc. are the intrinsic subprogram names

 E.g.
      INTRINSIC SIN, COS
      ...
      CALL MIKE(SIN,THETA,RES1)
      ...
      CALL MIKE(COS,THETA,RES2)
      ...
 will allow MIKE to use the SIN or COS functions.
%IOR
 INTEGER FUNCTION IOR (int1, int2)
     Returns the logical 'OR' of the two integer
 arguments.
 I.e. each bit of the result is set to 1 if either of the
 corresponding bits in the two arguments is 1, whereas if
 they are the both 0, then the result bit is set 0.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%ISHFT
 INTEGER FUNCTION ISHFT (integer, no-of-positions)
     Returns the first argument logically shifted left
 the number of bits specified by the second argument. A
 negative second argument implies a right shift. Vacated
 bits are filled with zeros.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%ISHFTC
 INTEGER FUNCTION ISHFTC (IW,ISHFT,NBITS)
     Returns the first argument with the least significant
 NBITS bits circularly shifted left by ISHFT.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%ISIGN
 INTEGER FUNCTION ISIGN (ival, isign)
     Returns the magnitude of the first argument, with
 the sign of the second.
 Both arguments must be integers.
%JNINT
 INTEGER FUNCTION JNINT (real*4-arg)
 Returns the value nearest to the value of the argument.
%KERNEL_LAST_OSERROR
 CALL KERNEL_LAST_OSERROR(IERR, ERMESS)
  to get the last error number and message from
    KERNEL_SWI or KERNEL_SWI_C
    Parameters:
    IERR    INTEGER returned error number
    ERMESS  CHARACTER returned error message
            this should be at least 252 long
%KERNEL_SWI
 LOGICAL FUNCTION KERNEL_SWI(NSWI, IREGS, OREGS)
 Purpose: to cause a SoftWare Interrupt(SWI) returning
 .TRUE. if there was an error. Call KERNEL_LAST_OSERROR
 to find the error.
    Parameters:
   NSWI    INTEGER SWI number
   IREGS   INTEGER array of the 10 input registers
           it is ususally convenient to use something like
           INTEGER IREGS(0:9) because this is the way the
           registers are numbered
   OREGS   INTEGER array of the 10 output registers
  Comment: you may find it more convenient to use ARCSWI
           from the Utilities library
 
%KERNEL_SWI_C
 LOGICAL FUNCTION KERNEL_SWI_C(NSWI, IREGS, OREGS, C)
 Purpose: to cause a SoftWare Interrupt(SWI) returning
 .TRUE. if there was an error. Call KERNEL_LAST_OSERROR
 to find the error.
    Parameters:
   NSWI    INTEGER SWI number
   IREGS   INTEGER array of the 10 input registers
           it is ususaaly convenient to use something like
           INTEGER IREGS(0:9) because this is the way the
           registers are numbered
   OREGS   INTEGER array of the 10 output registers
   C       LOGICAL returned C flag from the SWI
%LEN
 INTEGER FUNCTION LEN (string)
     Returns the number of characters in the argument of
 type CHARACTER.
%LGE
 LOGICAL FUNCTION LGE (string1, string2)
     Returns .TRUE. if string1 is greater than or equal
 to string2.
 The ASCII collating sequence determines the relationship
 between the CHARACTER arguments.
%LGT
 LOGICAL FUNCTION LGT (string1, string2)
     Returns .TRUE. if string1 is greater than string2.
 The ASCII collating sequence determines the relationship
 between the CHARACTER arguments.
%LLE
 LOGICAL FUNCTION LLE (string1, string2)
     Returns .TRUE. if string1 is less than or equal to
 string2.
 The ASCII collating sequence determines the relationship
 between the CHARACTER arguments.
%LLT
 LOGICAL FUNCTION LLT (string1, string2)
     Returns .TRUE. if string1 is less than string2.
 The ASCII collating sequence determines the relationship
 between the CHARACTER arguments.
%LNBLNK
       FUNCTION LNBLNK(string)
     Returns the position in the CHARACTER string of the
 last non-blank character. Thisis available in many
 compilers as an intrinsic function.
 
 Extension to the Fortran 77 standard  
%LOC
       FUNCTION LOC(VAR)
 Returns the memory address of the variable VAR in Bytes.
 VAR may be of any type other than CHARACTER.
 See LOCC for CHARACTER variables.

 Extension to the Fortran 77 standard  
%LOCC
       FUNCTION LOCC(STRING)
 Returns the memory address in bytes of the CHARACTER
 variable STRING.
 See LOC for other types of variable.

 Extension to the Fortran 77 standard  
%LOG
 FUNCTION LOG (arg)
     Returns the natural logarithm (to base e) of the
 argument

 Argument and result must both be either single or double
 precision, real or complex.

 A real argument must be greater than zero.
 A complex argument must not be (0.,0.).
%LOG10
 FUNCTION LOG10 (arg)
     Returns the logarithm to base 10 of the argumentt

 Argument and result must both be either single or double
 precision.
 The argument must be greater than zero.
%MAX
 FUNCTION MAX (arg1, arg2, ...)
     Returns the largest of the arguments.

 Arguments and result must all be one of integer, real*4
 or double precision
%MAX0
 INTEGER FUNCTION MAX0 (int1, int2, ...)
     Returns the largest of the integer arguments.
%MAX1
 INTEGER FUNCTION MAX1 (real*4-arg1, real*4-arg2, ...)
     Returns the truncated integer value of the largest
 of the arguments.
%MIN
 FUNCTION MIN (arg1, arg2, ...)
     Returns the smallest of the arguments.

 Arguments and result must all be one of integer, real*4
 or double precision.
%MIN0
 INTEGER FUNCTION MIN0 (int1, int2, ...)
     Returns the smallest of the integer arguments.
%MIN1
 INTEGER FUNCTION MIN1 (real*4-arg1, real*4-arg2, ...)
     Returns the truncated integer value of the smallest
 of the arguments.
%MOD
 FUNCTION MOD (dividend, divisor)
     Returns the remainder after dividing dividend by
 divisor.

 I.e.= dividend - divisor * integral part of
 (dividend / divisor)

 Arguments and result must all be one of integer, real*4
 or double precision
%MVBITS
 SUBROUTINE MVBITS(M,I,LEN,N,J)
 moves LEN bits from bit I in M to bit J in N
Parameters:
 M    - INTEGER*4 containing the bits to copy
 I    - bit position in M from which to start copying (>=0)
 LEN  - number of bits to copy (<=32)
 N    - INTEGER*4 to receive the bits
 J    - bit position in N into which to start copying (>=0)
Comments:
 N is altered only by the LEN bits starting at bit J
 bits are numbered from 0 starting at the least significant
 I+LEN and J+LEN must both be less than or equal to 32
%NAMELIST
 NAMELIST nlist
 This is a VMS extension to the ANSI standard Fortran77
 It allows a set of variables to be grouped under a single name
 
 nlist has the form: /groupname/variable list /more groups/etc
 for example:
      NAMELIST /INPUT/NAME, GROUP, DATE /OUTPUT/TOTAL, NAME
 It is only useful if Input/Output statements; for example:
     READ(10,INPUT)
 would read the variables: NAME, GROUP and DATE off stream 10.
%NINT
 INTEGER FUNCTION NINT (real-arg)
     Returns the value nearest to the value of the
 argument which may be REAL or DOUBLE PRECISION
%NOT
 INTEGER FUNCTION NOT (integer)
     Complements each bit of the argument.

 This is a non-standard Fortran77 function, but it
 conforms to ANSI/ISA and is defined in the MIL-STD-1753
 standard.
%OPEN
    OPEN([UNIT=]iunit[,ERR=statement#]
         [,IOSTAT=ios][,FILE=name],list)
   Opens an existing file or creates a new file.

 'iunit' is the logical unit number for the file and
         must be between 1 and 124. Units 5 and 6 are
         reserved for keyboard and screen.
 'statement#' to which control is passed on an error, but
         is only used for wrongly specified direct
         access files
 'ios'   error number (=0 if OK)
 'name'  the full file name to be attached to the unit;
         if omitted, 'FTunitF001' will be used
 'list'  specifies the properties of the file, and is of
         the form:
   PROPERTY1=value1,PROPERTY2=value2, etc.
 The possibilities are:

 ACCESS = acc:  the access mode which may be:
   'SEQUENTIAL' sequential access mode
   'DIRECT'     direct access mode
   'APPEND'     positions the file at the end ready for
                more writing  (implies ACCESS='SEQUENTIAL')

 BLANK = blnk:  interpretation of blanks in a formatted
                file:
   'NULL' blanks are ignored
   'ZERO' blanks other than leading blanks are treated as
          zeros.

 FORM = fm:  defines how the file is to be read/written
   'FORMATTED'   formatted (default for sequential
                 access)
   'UNFORMATTED' unformatted (default for direct access)
   'PRINTER'     formatted, and first character in each
                 record is for the carriage control of a
                 printer

 RECL = size: defines the record size (in bytes) of a
              direct access file (the maximum for
              formatted files is 512 bytes)

 STATUS = sta: defines the status of the file to be
               opened.
   'OLD'     opens an existing file
   'NEW'     creates a new file
   'SCRATCH' creates a new file and deletes it when the
             file is closed (may be superceded by a
             STATUS='KEEP' in the CLOSE statement)
   'UNKNOWN' opens the file as OLD if it exists or as NEW
             if it does not (this is the default)
%OPTIONS
 OPTIONS
 A VMS extension which is accepted by the compiler but
has no effect
%PARAMETER
      PARAMETER (par1=val1[,par2=val2]...)
   Assigns a symbolic name to a constant.

 'par1' etc. are symbolic names
 'val1' is a constant or constant expression which can be
        evaluated at compilation time.
%PAUSE
     PAUSE  [text]

   Pauses the execution of the program allowing you to
 continue or stop.

   The optional argument will be displayed following
 the word 'PAUSE' on the screen either in a text window
 or, if this is a wimp program, in an error window.
 In either case you can continue or stop at the prompt.
%PRINT
      PRINT format[,list]
   Transfers data from internal storage to the screen.

 'format' is a format specifier which may be:
          1) the label of a format statement
          2) a CHARACTER variable containing the format
             specification
          3) *
 In this last case, data are translated from binary to
 character format according to the data types of the
 variables in the I/O list.

 'list'   a comma separated list of names of variables,
          array elements, complete arrays or array
          elements under the control of implied DO loops.
%PROGRAM
      PROGRAM name
   Optionally begins a main program.  If used, it must be
 the first statement of the program.
 'name' is the symbolic name for the program.

%QSORTC

 CALL QSORTC( TEXT, INDX, N )

 Purpose: sorts an array of pointers to an CHARACTER array

 Parameters:

    TEXT  - CHARACTER array of N values

    INDX  - an INTEGER array of N pointers to the values stored in TEXT; the
            values should all be different and point to an elements of TEXT; 
            INDX is reordered by the routine so that the values pointed at
            in TEXT are in increasing order.

    N     - the size of the array INDX (and TEXT) to sort
 
 Errors: only if the initial pointers in INDX do not conform to the
         requirements above when you are likely to get addressing errors.

 Comments: QSORTC uses the QUICKSORT algorithm.

%QSORTD

 CALL QSORTD( D, INDX, N )

 Purpose: sorts an array of pointers to a DOUBLE PRECISION array

 Parameters:

    D     - DOUBLE PRECISION array

    INDX  - INTEGER array of N pointers to the values stored in D; the
            values should all be different and point to an elements of D;
            INDX is reordered by the routine so that the values pointed at
            in D are in increasing order.
            
    N     - the size of the array INDX to sort 
 

 Errors: only if the initial pointers in INDX do not conform to the
         requirements above when you are likely to get addressing errors.

 Example:
C          find the z ordering of the space points in XYZ so as they
C          can be plotted from the back to the front
      PARAMETER(N=10)
      DOUBLE PRECISION XYZ(3,N)
      DIMENSION INDX(N)
      DO 10 I=1,N
C          point to the z-component
        INDX(I)=3*I
   10 CONTINUE
      CALL QSORTD(XYZ,INDX,N)
C          now plot the points starting at the back
      DO 20 I=1,N
        J=INDX(I)/3
C          draw the point with a hypothetical subroutine
        CALL PLOT(XYZ(1,J))                      
   20 CONTINUE

 Comments: QSORTD is extremely fast because it uses the QUICKSORT algorithm,
          and uses only the ARM integer instruction set.


%QSORTI

 CALL QSORTI( IN, INDX, N )

 Purpose: sorts an array of pointers to an INTEGER array

 Parameters:

    IN    - INTEGER array

    INDX  - an INTEGER array of N pointers to the values stored in IN; the
            values should all be different and point to an elements of IN; 
            INDX is reordered by the routine so that the values pointed at
            in IN are in increasing order.

    N     - the size of the array INDX to sort
 
 Errors: only if the initial pointers in INDX do not conform to the
         requirements above when you are likely to get addressing errors.

 Example:
C          print the integers in the array IN in decreasing order
      PARAMETER(N=10)
      DIMENSION INDX(N),IN(N)
C          the values of IN have been previously defined
      DO 10 J=1,N
C          pointers to IN
        INDX(J)=J
   10 CONTINUE
      CALL QSORTI(IN,INDX,N)
C          now print the array in decreasing order
      DO 20 J=N,1,-1
        PRINT *,IN(INDX(J))
   20 CONTINUE

 Comments: QSORTI uses the QUICKSORT algorithm.

%QSORTR

 CALL QSORTR( R, INDX, N )

 Purpose: to sort an array of pointers to a REAL array

 Parameters:

    R     - REAL array

    INDX  - INTEGER array of N pointers to the values stored in R; the
            values should all be different and point to an elements of R;
            INDX is reordered by the routine so that the values pointed at
            in R are in increasing order.

    N     - the size of the array INDX to sort
 
 Errors: only if the initial pointers in INDX do not conform to the
         requirements above when you are likely to get addressing errors.

 Example:
C          find the z- ordering of the space points in XYZ so as they
C          can be plotted from the back to the front
      PARAMETER(N=10)
      DIMENSION INDX(N), XYZ(3,N)
      DO 10 I=1,N
C          point to the z-component
        INDX(I)=3*I
   10 CONTINUE
      CALL QSORTR(XYZ,INDX,N)
C          now plot the points starting at the back
      DO 20 I=1,N
        J=INDX(I)/3
C          draw the point with a hypothetical subroutine
        CALL PLOT(XYZ(1,J))                      
   20 CONTINUE

 Comments: QSORTR is extremely fast because it uses the QUICKSORT algorithm
         and uses only the ARM integer instruction set.

%READ
 READ transfers data from external or internal units to
 internal storage.

 The meanings of the symbolic abbreviations used to
 represent the control information list parameters in the  READ statement syntax are as follows:

 'extu' is the logical unit or internal file, optionally
        prefaced by UNIT=.

 'fmt' is the format specification or an asterisk (*) to
       indicate list-directed formatting.  Fmt is
       optionally prefaced by FMT=.

 'rec' is the cell number of a record to be accessed
       directly, optionally prefaced by REC=.

 'iostat' is the name of a variable to contain the
          completion status of the I/O operation,
          optionally prefaced by IOSTAT=.

 'err' is the label of a statement to which control is
       transferred in the event of an error, optionally
       prefaced by ERR=.

 'end' is the label of a statement to which control is
       transferred in the event of an end of file,
       optionally prefaced by END=.

 'nml' is a VMS optional extension to the standard;
       it describes possible input of formatted
       records under control of a NAMELIST,
       optionally prefaced by NML=.

 'iolist' gives the names of the variables, arrays, or
          array elements to which data will be
          transferred. It may contain implied DO loops

1) Reading formatted sequential files or from the
 keyboard.

 a)   READ(extu,fmt[,err][,iostat][,end][,nml])[iolist]
   reads from a specified external unit, or

 b)   READ fmt[,iolist]
   reads from the keyboard

2) Reading unformatted sequential files

      READ(extu,[,err][,iostat][,end])[iolist]
   reads from a specified external unit and does not
 translate the data.

3) Reading direct access formatted files

      READ(extu,fmt,rec[,err][,iostat])[iolist]
   reads from a specified external unit

4) Reading direct access unformatted files

      READ(extu,rec[,err][,iostat])[iolist]
   reads from a specified external unit and does not
 translate the data.

5) Reading from an internal CHARACTER string

      READ(string,fmt[,err][,iostat][,end])[iolist]
   Reads from a specified character variable, translates
 the data according to fmt
%RETURN
      RETURN [i]
   Returns control from a subprogram to the caller.

 'i' is an integer constant or expression indicating the
     position of an alternate return from the subprogram
     in the actual argument list.
%REWIND
      REWIND ([UNIT=]iunit[,ERR=statement#][,IOSTAT=ios])
 or
      REWIND iunit
    Positions a file on unit 'iunit' before the first
 record.

 On finding an error, control passes to 'statement#'

 Returns 'ios', the completion status (=0 if OK)

 This is implemented as a CLOSE followed by a repeat
 OPEN.
%REAL
 REAL FUNCTION REAL (arg)
     Converts the argument to a real value. The argument
 may be integer, real or complex of either precision. The
 real part of a complex argument is taken.
%RESMEM

 SUBROUTINE RESMEM(N,COMMON,IADD)

 Purpose: to reserve an area of memory (like memalloc)

 Parameters:

       N  INTEGER number of 4-byte words to reserve
                  or zero to deallocate previously reserved words

  COMMON  first word of a common block to which the memory will be assigned

    IADD  INTEGER returned increment to the reserved block in COMMON

 Errors: IADD returned zero

 Comments: 1) only one reserved block is allowed at any time

 Example:

      SUBROUTINE PLOT(N,XY)
      DIMENSION XY(2,N)
      COMMON JOE(2)
C              reserve space for transformed coords
      CALL RESMEM(2*N,JOE,IADD)
      IF(IADD.EQ.0) STOP 'failed to assign memory'
      JOE(IADD+1) = xxx
          ...
      JOE(IADD+2*N) = yyy
      CALL FRED(JOE(IADD+1),N)
C             deallocate the space
      CALL RESMEM(0,0,0)
      RETURN
      END



 
%RND01

 REAL FUNCTION RND01()

 Purpose: calculates pseudo-random numbers

 Parameters: none

 Result: 

   a random REAL number in the range 0.0 <= Result < 1.0

 Example:

      DO 10 I=1,10
        PRINT *,RND01()
   10 CONTINUE

 Results in: Ten floating point numbers between 0 and 1

 Comments: The sequence of numbers will be the same for each execution
unless SETRND has been called. Note that zero may be part of the sequence,
but 1.0 will never occur, so take care when using -LOG( RND01() ) to obtain
an exponential distribution.

Similar routine available in Fortran77 (release 2)

%SAVE
      SAVE [a[,a]...]
   Values of data elements which are to be saved across
 calls to a subprogram.

 'a' is a common block name enclosed in slashes, a
     variable name, or an array name.

 A SAVE statement without any names causes all allowable
 data elements in the subprogram to be saved.
%SETBUF
 FUNCTION SETBUF(IUNIT,MODE)
     Would set the buffering mode of a unit.
     Not implemented here but dummy in the library returns
     INTEGER zero
%SETRND
 SUBROUTINE SETRND(I)
     Selects a new random number sequence depending on I.
 If I=0, it starts a non-repeatable sequence.

 See RND01 for extracting the random numbers

 This is an extension to the Fortran 77 standard
%SIGN
 FUNCTION SIGN (value, sign)
     Returns the magnitude of the first argument, with
 the sign of the second.

 Arguments and result must all be one of integer, real*4
 or double precision.
%SIN
 FUNCTION SIN (arg)
     Returns the sine of the argument which is in
 radians.

 Argument and result must both be either single or double
 precision, real or complex.
%SINH
 FUNCTION SINH (arg)
     Returns the hyperbolic sine of the argument.

 Argument and result must both be either single or double
 precision.
%SNGL
 REAL FUNCTION SNGL (real*8-arg)
     Converts REAL*8 to REAL*4.
%SQRT
 FUNCTION SQRT (arg)
     Returns the square root of the argument.

 Argument and result must both be either single or double
 precision, real or complex.

 For the real square root, the argument must be greater
 or equal to zero.
 For the complex square root, the result is the principal
 value, with the real part greater than or equal to zero. 
 If the real part is zero, the result is the principal
 value, with the imaginary part greater than or
 equal to zero.
%STOP
      STOP [disp]
   Terminates program execution and writes the message
'disp' to the screen
%SUBROUTINE
      SUBROUTINE name[([par1[,par2]...])]
   Begins a subroutine with symbolic name 'name',and
 defines the dummy arguments, 'par1' etc.

  'par1' can also be a *, indicating an alternate return
 argument.
%TAN
 FUNCTION TAN (real-arg)
     Returns the sine of the argument which is in
 radians.

 Argument and result must both be either single or double
 precision.
%TANH
 FUNCTION TANH (real-arg)
     Returns the hyperbolic tangent of the argument.

 Argument and result must both be either single or double
 precision.
%TYPE
  TYPE f[,list]   or TYPE *[,list]
 These are VMS extensions which are identical to:
  PRINT f[,list]  or PRINT *[,LIST]
 in that they send the contents of 'list' to the
standard output stream either under format control (f)
or list directed (*).
%VIRTUAL
 VIRTUAL
 A VMS directive which has the same meaning and effect as
 DIMENSION
%VOLATILE
 VOLATILE
 A VMS extension which is accepted by the compiler but
has no effect
%WHILE
      DO [statement#[,]] WHILE (expr)
  or
      WHILE (expr) DO
 Executes a block of statements repeatedly while the
 value of a logical expression, 'expr', is true.

 The block of statements can either be terminated at an
 instruction labelled with the 'statement#', or by an
 ENDDO instruction, when 'statement#' is not in the DO
 statement. The 'WHILE (expr) DO' form must always be
 terminated  with an ENDWHILE statement.

 WHILE is not standard Fortran 77.
%WRITE
 WRITE transfers data from internal storage to external
 or internal units.

 The meanings of the symbolic abbreviations used to
 represent the control information list parameters in the
 WRITE statement syntax are as follows:

 'extu' is the logical unit or internal file, optionally
        prefaced by UNIT=, * indicates writing to the
        screen.

 'fmt' is the format specification or an asterisk (*) to
       indicate list-directed formatting.  Fmt is
       optionally prefaced by FMT=.

 'rec' is the cell number of a record to be accessed
       directly, optionally prefaced by REC=.

 'iostat' is the name of a variable to contain the
          completion status of the I/O operation,
           optionally prefaced by IOSTAT=.

 'err' is the label of a statement to which control is
       transferred in the event of an error, optionally
       prefaced by ERR=.

 'end' is the label of a statement to which control is
       transferred in the event of an end of file,
       optionally prefaced by END=.

 'nml' is a VMS optional extension to the standard;
       it describes possible output of formatted
       records under control of a NAMELIST,
       optionally prefaced by NML=.

 'iolist' gives the names of the variables, arrays, or
         array elements to which data will be
          transferred. It may contain implied DO loops

1) Writing to a formatted sequential file or the screen.

     WRITE (extu,fmt[,err][,iostat][,nml])[iolist]
 Writes to a specified external unit, Translating the
 data from binary to character format as specified by fmt

2) Writing to an unformatted sequential file

     WRITE (extu[,err][,iostat])[iolist]
 Writes to a specified external unit and does not
 translate the data.

3) Writing to formatted direct access files

     WRITE (extu,rec,fmt[,err][,iostat])[iolist]
 Writes to a specified external unit, Translating the
 data from binary to character format as specified by fmt

4) Writing to unformatted direct access files

     WRITE (extu,rec[,err][,iostat])[iolist]
 Writes to a specified external unit and does not
 translate the data.

5) Writing to a CHARACTER string

     WRITE (string[,fmt][,err][,iostat])[iolist]
 Writes to a specified character string, Translating
 the data from binary to character format as specified by
 fmt
