The ATTRIBUTES directive option ALIAS specifies an alternate external name to be used when referring to external subprograms. It takes the following form:
The ALIAS option overrides the C (and STDCALL) option. If both C and ALIAS are specified for a subprogram, the subprogram is given the C calling convention, but not the C naming convention. It instead receives the name given for ALIAS, with no modifications.
ALIAS cannot be used with internal procedures, and it cannot be applied to dummy arguments.
The following example gives the subroutine happy the name "_OtherName@4" outside this scoping unit:
INTERFACE
SUBROUTINE happy(i)
!DEC$ ATTRIBUTES STDCALL, DECORATE, ALIAS:'OtherName' :: happy
INTEGER i
END SUBROUTINE
END INTERFACE
cDEC$ ATTRIBUTES ALIAS has the same effect as the cDEC$ ALIAS directive.