Jump to content

Update a configuration file: Difference between revisions

m
(→‎{{header|Erlang}}: Add Fortran.)
Line 579:
/
</pre>
Evidently, the variables namesnamed in the NAMELIST are written out, one to a line in free-format with a style appropriate to its type, much as if they were assignment statements within a source file. The namelist's name starts the output, and the block of values ends with a line starting with a slash. On input, blocks will be skipped until the correct block name is found, so a single file may contain parameters for multiple usages. All output starts with column two so that column one can be used as a carriage control character if output is to go to a lineprinter. There is special provision for an array's value list whereby a run of equal values can be noted via <code>''n''*''value''</code> to save space, further, an input statement for an array can name a single element (the others being unaffected), and with F90, the usual array span facilities are available as in <code>A(6:10) = 5*3.14</code>
 
The names may appear in any order, and names can be omitted - if so, the corresponding variable will be unaffected by a READ. This file could of course be edited before being read back in. F90 introduces the ! character as an "escape" comment and this is recognised in the NAMELIST input, outside of text literals of course.
1,220

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.