fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

DESCRIPTOR

Syntax:

!% DESCRIPTOR [:] [:] <symbol> [ , <symbol> ... ]

Function:

Specifies that the named sub-program arguments are passed by descriptor. A descriptor is a structure which contains the address, data size (e.g. string length) and data type of the object. The sub-program call site contains the address of the descriptor rather than of the object itself. Pass by descriptor is the default string passing mechanism under VMS, but not in most Unix and PC implementations. Non-character variables are passed by descriptor in some circumstances. The fpt command REMOVE %DESCR may be used to remove the protocol specification from the code.

fpt uses this information in the argument consistency check (please see CHECK ARGUMENTS). The alternative protocol specifications for 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 %DESCRIPTOR 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

By reference for numeric arguments, and as specified by the command:

PASS STRING ARGUMENTS

for arguments of type character.

Examples

SUBROUTINE ENQUEUE(QUEUE,TOKEN) INTEGER*4 QUEUE INTEGER*4 TOKEN(4) !% DESCRIPTOR :: TOKEN

See Also

CHECK ARGUMENTS

REMOVE %DESCR

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