14.2.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 14.2.1.1).
att
Is one of the following:

ALIAS  REFERENCE 
C  STDCALL 
DLLEXPORT [1]  VALUE 
DLLIMPORT [1]  VARYING 
EXTERN   

[1] WNT, W95

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 
ALIAS  No  Yes  Yes 
C  No  Yes  Yes 
DLLEXPORT  No  Yes  Yes 
DLLIMPORT  No  Yes  Yes 
EXTERN  Yes  No  No 
REFERENCE  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[/]

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:


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

For More Information:


Previous Page Next Page Table of Contents