Jump to content

Update a configuration file: Difference between revisions

m
Line 583:
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.
 
Naturally, a parameter file could contain data in whatever format desired: such a file could be read and its components extracted via suitable code then written in the NAMELIST style to a scratch file and read back for the actual internalisation of values. The point of this is that a text name of a variable is associated with the actual computer variable via the NAMELIST facility, the programmer need not slog through some endless CASE statement on the names of the variables. This process would be reversed for output.
 
But given that the NAMELIST protocol is available without difficulty, why would a hard-core fortranner bother for a Fortran programme?
1,220

edits

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