Namelist formatting is indicated by an input/output statement with an NML= specifier. Namelist input and output consists of
The characters in namelist records form a sequence of name-value subsequences. A name-value subsequence is a data object or subobject previously declared in a NAMELIST statement to be part of the namelist group, followed by an equals, followed by one or more values and value separators.
Formatting for namelist records is the same as for list-directed records.
integer :: i,j(10)
real :: n(5)
namelist /my_namelist/ i,j,n
If the input records are
&my_namelist i=5, n(3)=4.5,
then 5 is stored in i, 4.5 in n(3), and 0 in elements 1 through 4 of j.