iface

Specifies the default calling convention for an application or the argument-passing convention used for hidden-length character arguments.

IDE Equivalent

Windows:
External Procedures > Calling Convention
(/iface:{cref|stdref|stdcall|cvf|default}
External Procedures > String Length Argument Passing
(/iface:[no]mixed_str_len_arg)
Linux: None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: None
Windows:  /iface:keyword

Arguments

keyword   Specifies the calling convention or the argument-passing convention. Possible values are:
  default Tells the compiler to use the default calling conventions.
  cref Tells the compiler to use calling conventions C, REFERENCE.

 

cvf

Tells the compiler to use calling convention CVF.

 

[no]mixed_str_len_arg Determines the argument-passing convention for hidden-length character arguments.

 

stdcall Tells the compiler to use calling convention STDCALL.

 

stdref Tells the compiler to use calling conventions STDCALL, REFERENCE.

Default

/iface:default The default calling convention is used.
/iface:nomixed_str_len_arg Hidden lengths are placed in sequential order at the end of the argument list.

Description

This option specifies the default calling convention for an application or the argument-passing convention used for hidden-length character arguments.

On IA-32 and Intel EMT64 systems, you can change the default calling convention by using one of the following methods:

The second method overrides the first.

On ItaniumŪ-based systems, the only option available is /iface:default.

Option

Description

/iface:default Tells the compiler to use the default calling conventions. This is the only option available on ItaniumŪ-based systems.
/iface:cref Tells the compiler to use calling conventions C, REFERENCE.
/iface:cvf Tells the compiler to use calling convention CVF (Compaq* and Powerstation* compatibility). By default, /iface:cvf passes arguments by reference. /iface:cvf sets the /iface:mixed_str_len_arg option. This causes CHARACTER variables to be passed as address/length pairs.
/iface:mixed_str_len_arg Specifies argument-passing conventions for hidden-length character arguments. This option tells the compiler that the hidden length passed for a character argument is to be placed immediately after its corresponding character argument in the argument list. This is the method used by Microsoft* Fortran PowerStation. When porting mixed-language programs that pass character arguments, either this option must be specified correctly or the order of hidden length arguments changed in the source code.
/iface:stdcall Tells the compiler to use calling convention STDCALL. By default, /iface:stdcall passes arguments by value.
/iface:stdref Tells the compiler to use calling conventions STDCALL, REFERENCE.
The /iface:stdcall and /iface:cvf options cause the routine compiled and routines that are called to have a @<n> appended to the external symbol name, where n is the number of bytes of all parameters. Both options assume that any routine called from a Fortran routine compiled this way will do its own stack cleanup.

Caution

On Windows systems, if you specify option /iface:cref, it overrides the default for external names and causes them to be lowercase. It is as if you specified "!dec$ attributes c, reference" for the external name.
If you specify option /iface:cref and want external names to be uppercase, you must explicitly specify option /names:uppercase.

Alternate Options

/iface:cvf Linux: None 
Windows: /Gm
/iface:mixed_str_len_arg     Linux: -mixed_str_len_arg
Windows: None
/iface:nomixed_str_len_arg Linux:-nomixed_str_len_arg
Windows: None
/iface:stdcall Linux: None
Windows: /Gz

See Also

Building Applications: Programming with Mixed Languages Overview and related sections

IntelŪ Fortran Language Reference: the ATTRIBUTES directive