fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

VARIANT

Syntax:

!% VARIANT [:] [:] <symbol> [ , <symbol> ... ] !% VARIANT [:] [:] <string> [ , <string> ... ]

Function:

This command is written as a comment in the Fortran code. It specifies that the named sub-program argument is of variant data type. fpt uses this information in the argument consistency check (please see CHECK ARGUMENTS). The named objects are assumed to be variant in data size and data type, and these checks are suspended for them.

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

The % VARIANT command must be written in code within the scope of declaration of the variable. It is introduced by a comment delimiter in column 1 and the character % in column 2.

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

By default all arguments are assumed to be not variant.

Examples

SUBROUTINE HEXDUMP(VAL,ICOUNT) INTEGER*4 VAL ! Bytes to be dumped as HEX INTEGER*4 ICOUNT ! Number of bytes !% VARIANT :: VAL

See Also

CHECK ARGUMENTS

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