15.1.3 ATTRIBUTES Directive

The ATTRIBUTES directive lets you specify properties for data objects and procedures. It takes the following form: [See Note]

cDEC$ ATTRIBUTES att [, att]... :: object [, object]...

c
Is one of the following: C (or c), !, or * (see Section 15.1.1).


att
Is one of the following:


ADDRESS64 1  DESCRIPTOR32 3  REFERENCE 
ALIAS  DESCRIPTOR64 3  REFERENCE32 3 
ALLOW_NULL  DLLEXPORT 2  REFERENCE64 3 
ARRAY_VISUALIZER 2  DLLIMPORT 2  STDCALL 
C  EXTERN  VALUE 
DECORATE  IGNORE_LOC  VARYING 
DEFAULT  NO_ARG_CHECK   
DESCRIPTOR 3  NOMIXED_STR_LEN_ARG   
1 VMS, WNT
2 WNT, W9*
3 VMS only

object
Is the name of a data object or procedure.

The following table shows which properties can be used with various objects:

Property  Variable and Array Declarations  Common Block Names 1  Subprogram Specification
and EXTERNAL Statements
 
ADDRESS64  Yes  Yes  No 
ALIAS  No  Yes  Yes 
ALLOW_NULL  Yes  No  No 
ARRAY_VISUALIZER2 Yes  No  No 
C  No  Yes  Yes 
DECORATE  No  No  Yes 
DEFAULT  No  Yes  Yes 
DESCRIPTOR  Yes3  No  No 
DESCRIPTOR32  Yes3  No  No 
DESCRIPTOR64  Yes3  No  No 
DLLEXPORT  Yes4  Yes  Yes 
DLLIMPORT  Yes  Yes  Yes 
EXTERN  Yes  No  No 
IGNORE_LOC  Yes  No  No 
NO_ARG_CHECK  Yes  No  Yes5 
NOMIXED_STR_LEN_ARG  No  No  Yes 
REFERENCE  Yes  No  Yes 
REFERENCE32  Yes  No  No 
REFERENCE64  Yes  No  No 
STDCALL  No  Yes  Yes 
VALUE  Yes  No  No 
VARYING  No  No  Yes 
1 A common block name is specified as [/]common-block-name[/]
2 This property can only be applied to arrays.
3 This property can only be applied to INTERFACE blocks.
4 Module-level variables and arrays only.
5 This property cannot be applied to EXTERNAL statements.

These properties can be used in function and subroutine definitions, in type declarations, and with the INTERFACE and ENTRY statements.

Properties applied to entities available through use or host association are in effect during the association. For example, consider the following:

MODULE MOD1
  INTERFACE
    SUBROUTINE SUB1
    !DEC$ ATTRIBUTES C, ALIAS:'othername' :: NEW_SUB
    END SUBROUTINE
  END INTERFACE
  CONTAINS
    SUBROUTINE SUB2
    CALL NEW_SUB
    END SUBROUTINE
END MODULE

In this case, the call to NEW_SUB within SUB2 uses the C and ALIAS properties specified in the interface block.

The properties are described as follows:

Options C, STDCALL, REFERENCE, VALUE, and VARYING affect the calling conventions of routines:


Note: The following form is also allowed for this attribute: !MS$ATTRIBUTES att [,att]... :: object [,object]...

For More Information:


Previous Page Next Page Table of Contents