fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

REMOVE %DESCR

Syntax:

[DO NOT] REMOVE %DESCR

Function:

A descriptor is a structure which contains the address, data size and data type of a variable. %DESCR is an argument protocol directive which instructs the compiler to pass a sub-program argument by descriptor. It is implemented under VMS and in a small number of other environments.

VMS uses descriptors to reference character variables. All character variables and literals passed as arguments to sub-programs are passed by descriptor by default. Most other systems pass character arguments by address, with an additional length argument pushed onto the system stack. When code is migrated from VMS to other environments, %DESCR must usually be removed. The native argument passing mechanism is then used automatically. The command REMOVE %DESCR carries out the removal systematically through the code.

%DESCR is also used under VMS to create descriptors for non-character objects. In particular, this is used in handling structures in queues. These occurrences usually do not migrate to Unix or Windows in a straightforward way. When fpt removes %DESCR for a non-character object a diagnostic is therefore embedded in the code.

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code Yes

Default

No change is made by default.

Examples

The CALL statement in the code:

CHARACTER*128 ST1,ST2 : : CALL RSUB(%DESCR(ST1),%DESCR(ST2),IE)

is modified to:

CALL RSUB(ST1,ST2,IE) !-------------------^---^------------------------------------------ !!! fpt - 2681 %DESCR removed from the code !------------------------------------------------------------------

The CALL statement in the code:

RECORD /QREC/ JOB2 : : CALL QSUB(%DESCR(JOB2),IE)

is modified to:

CALL RSUB(JOB2,IE) !------------------^----------------------------------------------- !!! fpt - 2681 %DESCR removed from the code !!! fpt - 2909 %DESCR was used for a non-CHARACTER object !------------------------------------------------------------------

See Also

Migration from VMS to Windows or Unix

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