FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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

!% STRING

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.

Example:

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

See also:

CHECK ARGUMENTS

REMOVE %DESCR


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