fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

STRING Argument Passing Protocol

Syntax:

!% STRING [:] [:] <symbol> [ , <symbol> ...] !% ADDRESS AND LENGTH [:] [:] <symbol> [ , <symbol> ...]

Function:

Specifies that the named sub-program arguments are passed as strings in the conventional Unix Fortran manner. When the sub-program is called, each string argument is passed as two separate tokens, one which contains the address of the string, and another which contains the length. fpt uses this information in the argument consistency check (please see CHECK ARGUMENTS). The alternative protocol specifications for character arguments are:

!% VALUE
!% REFERENCE
!% DESCRIPTOR
!% ADDRESS AND LENGTH

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

The %STRING command must be written in the Fortran code within the scope of declaration of the variable.

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, CHARACTER arguments are assumed to be passed by address and length and numeric arguments are assumed to be passed by reference.

Example:

SUBROUTINE repval(namea,vala) REAL*4 vala CHARACTER*16 namea !% ADDRESS AND LENGTH :: namea

See Also

CHECK ARGUMENTS

PASS STRING ARGUMENTS

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