FORTRAN 77 Language Reference

Syntax Rules

The following syntax rules apply for input data to be read by NAMELIST:

A complex constant is a pair of real or integer constants separated by a comma and enclosed in parentheses. Spaces can occur only around the punctuation.

A logical constant is any form of true or false value, such as .TRUE. or .FALSE., or any value beginning with .T, .F, and so on.

A null data item is denoted by two consecutive commas, and it means the corresponding array element or complex variable value is not to be changed. Null data item can be used with array elements or complex variables only. One null data item represents an entire complex constant; you cannot use it for either part of a complex constant.

Example: NAMELIST input with some null data:


* nam2.f Namelist input with consecutive commas 
	REAL ARRAY(4,4) 
	NAMELIST /GRID/ ARRAY 
	WRITE ( *, * ) 'Input?' 
	READ ( *, GRID ) 
	WRITE ( *, GRID ) 
	END 

The data for nam2.f is:


¤$GRID ARRAY = 9,9,9,9,,,,,8,8,8,8 $

This code loads 9s into row 1, skips 4 elements, and loads 8s into row 3 of ARRAY.