FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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 intrinsic function which returns the descriptor for its argument. It is implemented under VMS and in a small number of other environments, but not under Compaq Visual Fortran or most Unix systems.

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 may 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 NT 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.

Example:

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 2014 Software Validation Ltd. All rights reserved.