1 NAMELIST
!
!  Help file for NAMELIST
!
!	Randall Rushe
!	Air Force Weapons Lab
!	16 August 1980
!
NAMELIST is a set of subroutines which permit the emulation
of the Cray namelist functions.

There are three user callable subroutines for namelist emulation,

	1) NAMELIST  - equivalent to NAMELIST statement in CFT
	2) READNAME  - equivalent to READ(iunit,namelist) in CFT
	3) WRITENAME - equivalent to WRITE(iunit,namelist) in CFT

2 NAMELIST
Subroutine to perform the namelist initialization.  It is equivalent
to the non-executable NAMELIST declaration in CFT, and must be called
once before the namelist is accessed in a READNAME or WRITENAME call.
If called more than once the subsequent calls are ignored.

The form of the call from FORTRAN is:

	CALL NAMELIST('group_name','v1',%DESCR(v1),...,'vN',%DESCR(vN))

Where	group_name	is the character string literal of the name of
			    the namelist group being initialized. This
			    name must be unique within the program and
			    its subroutines and must appear exactly as
			    it will be used in READNAME or WRITENAME calls
			    (i.e. uppercase with no blanks)
	 v1..vN		are the character string literals of the names
			    of the namelist variables in this group,
			    subject to the same restrictions as the
			    group_name literal.
 %DESCR(v1)..%DESCR(vN) are VAX/FORTRAN functions which reference the
			    variables to be contained in the namelist
2 READNAME
Subroutine to read a namelist.  The namelist initialization routine
NAMELIST must have been previously called to initialize the namelist
table for the given namelist.  Form of call to this routine is:

	CALL READNAME(iunit,'group_name'[,istatus])

Where      iunit	is the INTEGER logical unit number from which
			    to read the namelist.
	 group_name	is the string literal of the namelist name.
	  istatus	is an optional INTEGER status return to indicate
			   success or non-fatal EOF (1=ok, 2=error).
			   If present an EOF while searching for a namelist
			   in the input stream is non-fatal.  If not 
			   present an EOF will be fatal.  Occurence of
			   an EOF while processing a namelist is an un-
			   conditionally fatal error.
2 WRITENAME
Subroutine to write a namelist.  The namelist initialization routine
NAMELIST must have been previously called to initialize the namelist
table for the given namelist.  Form of call to this routine is:

	CALL WRITENAME(iunit,'group_name')

Where      iunit	is the INTEGER logical unit number to which
			    the namelist is to be written.
	 group_name	is the string literal of the namelist name.

The output generated by WRITENAME is in a format suitable for use by
READNAME.
2 EXAMPLES
An example of namelist usage would be:

	DIMENSION ARRAY(6)
	LOGICAL	  FLAG
	COMPLEX	  C
	INTEGER   N
C	NAMELIST /ALPHA/ ARRAY,FLAG,N,C
	CALL NAMELIST('ALPHA','ARRAY',%DESCR(ARRAY),
	1	'FLAG',%DESCR(FLAG),'N',%DESCR(N),
	2	'C',%DESCR(C))
C	READ(5,ALPHA,END=xxx)
 10	CALL READNAME(5,'ALPHA',ISTAT)
	IF(.NOT.ISTAT)STOP 'NO MORE DATA'
	CALL WRITENAME(6,'ALPHA')
	...process data...
	GOTO 10
	END

Input data:
 $ALPHA   ARRAY=1,2,2*8.4,  FLAG=.TRUE.
     N=3,
     C=(1.3,5.6) $

Output:
 $ALPHA
         ARRAY          =    1.000000    ,   2.000000    ,   8.400000    ,
                             8.400000    ,   0.000000    ,   0.000000    ,
         FLAG           =          .TRUE.,
         N              =               3,
         C              = (   1.300000    ,   5.600000    ),
 $END_ALPHA
2 DATA_TYPES
Current data types supported are:	BYTE
					INTEGER*2
					INTEGER*4
					LOGICAL*1
					LOGICAL*2
					LOGICAL*4
					REAL*4
					REAL*8
					COMPLEX*8
					COMPLEX*16

Current array support:     1-D arrays only, no bounds checking
                           Other array support will be added.
2 RESTRICTIONS
This namelist emulator is compatible with the Cray implementation with
the following restrictions:

	1)  The Cray namelist user control subroutines RNLxxx and
		WNLxxx are not supported.
	2)  Automatic conversion of real to integer data types is not
		supported (integer to real conversion is supported).
	3)  Namelist group names are global to the entire program.
	4)  Echo flags are not supported.
	5)  Hollerith data is not supported.
	6)  Upper and lower case are different

The following extensions have been made with regard to the Cray
implementation:

	1)  Commas (,) following constants are optional at the ends of
		lines or before the namelist terminator ($ or &)
	2)  Additional VAX data types are supported.
