FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


OPTIONAL

Syntax:

!% OPTIONAL [:] [:] { <symbol> | <string> }...

Function:

Specifies that the named sub-program argument(s) are optional. FPT uses this information in the argument consistency check (please see CHECK ARGUMENTS). No error or warning is generated if the optional argument is omitted when the routine is called.

Names which contain exotic characters such as '%', ':' or '#' (which are all legal on some systems) must be written as quoted strings.

The %OPTIONAL command must be written in code within the scope of declaration of the variables.

Where to use this command:

Operating system command line

No


Configuration file, config.fsp

No


Specification (FSP) files, *.fsp

No


Interactively, to FPT> prompt:

No


Interactive command files

No


Embedded in the Fortran code

Yes


Default:

Not optional.

Example:

SUBROUTINE FILE_OPEN(LUN,FNAME,HEADER) INTEGER*4 LUN ! Unit to open CHARACTER*(*) FNAME ! File name CHARACTER*(*) HEADER ! Header at start of file !% OPTIONAL :: HEADER

See also:

CHECK ARGUMENTS


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