fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

BUILD NAMELIST AS ...

Syntax:

BUILD NAMELIST AS [A] SINGLE STATEMENT
BUILD NAMELIST AS MULTIPLE STATEMENTS

Function:

The command BUILD NAMELIST FOR COMMON BLOCKS instructs fpt to generate a NAMELIST which contains all of the variables in COMMON blocks in the entire program. The NAMELIST may then be used to initialise the program or to control it at run-time.

The NAMELIST is written in an INCLUDE file. The file name is made up of the base file name of the first FSP or Fortran source file specified, with the suffix _nml and the default output file name extension for INCLUDE files (Please see INCLUDE OUTPUT FILE NAME EXTENSION). If a value for MAXIMUM BASE FILE NAME LENGTH has been specified, the file name may be shortened.

fpt writes the NAMELIST in either of two formats, controlled by the commands BUILD NAMELIST AS A SINGLE STATEMENT and BUILD NAMELIST AS MULTIPLE STATEMENTS.

If the NAMELIST is built as a single statement, it is written, for example:

NAMELIST /COMMONS/ADBATTRIB,ADBCOMNAME,ADBDIMTAB,ADBSYMNAME, & BEAR1,BEAR2,B_ADBCHARACTER,B_ADBINTEGER,B_DEVCOM,B_PATCOM,C1, & C2,CPATH,IRAN,MPATH,V1,V2,X1,X2,Y1,Y2,Z1,Z2

if it is built as multiple statements, it is written, for example:

NAMELIST /COMMONS/ADBATTRIB NAMELIST /COMMONS/ADBCOMNAME NAMELIST /COMMONS/ADBDIMTAB NAMELIST /COMMONS/ADBSYMNAME NAMELIST /COMMONS/BEAR1 NAMELIST /COMMONS/BEAR2 NAMELIST /COMMONS/B_ADBCHARACTER NAMELIST /COMMONS/B_ADBINTEGER NAMELIST /COMMONS/B_DEVCOM NAMELIST /COMMONS/B_PATCOM :

Most compilers will accept at least one of these formats, and most will allow many hundreds of names to be present in a NAMELIST.

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp No
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code No

Default:

BUILD NAMELIST AS MULTIPLE STATEMENTS

Examples

In an FSP file:

%build namelist as a single statement %build namelist for common blocks %move common blocks to a single INCLUDE file

See Also

BUILD NAMELIST FOR COMMON BLOCKS

COMMON BLOCK NAMELIST NAME

MOVE COMMON BLOCKS TO A SINGLE INCLUDE FILE

Copyright ©1995 to 2018 Software Validation Ltd. All rights reserved.