Visible to Intel only — GUID: GUID-36DAE6D3-FAD7-427A-BDDF-686EB95F9453
Visible to Intel only — GUID: GUID-36DAE6D3-FAD7-427A-BDDF-686EB95F9453
ATTRIBUTES VARYING
The ATTRIBUTES directive option VARYING allows a Fortran routine to call a C/C++ routine with a variable number of arguments.
!DIR$ ATTRIBUTES VARYING :: var[, var] ...
var |
Is a variable representing a C/C++ routine that takes a variable number of arguments. |
This attribute can be used in an interface block to create an explicit interface for a C/C++ routine or it can be used on a variable declared EXTERN that represents a C/C++ routine. When the routine is called from the Fortran code, a variable number of arguments can be specified.
This attribute cannot be used with a Fortran routine declaration.
If ATTRIBUTES VARYING is specified, the C calling convention must also be used, either implicitly or explicitly.
All actual arguments in the routine call are passed to the called routine, regardless of the number of dummy arguments specified in the interface. If the called routine tries to access a dummy argument that has no matching actual argument, it causes a user error and the program may fail unpredictably.