Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

AUTOAddArg

AUTO Subroutine: Passes an argument name and value and adds the argument to the argument list data structure. This routine is only available for Windows.

Module

USE IFAUTO

USE IFWINTY

CALL AUTOAddArg (invoke_args,name,value[,intent_arg][,type])

invoke_args

The argument list data structure. Must be of type INTEGER(INT_PTR_KIND()).

name

The argument's name of type CHARACTER*(*).

value

The argument's value. Must be of type INTEGER(1), INTEGER(2), INTEGER(4), REAL(4), REAL(8), LOGICAL(2), CHARACTER*(*), or a single dimension array of one of these types. Can also be of type VARIANT, which is defined in the IFWINTY module.

intent_arg

Indicates the intended use of the argument by the called method. Must be one of the following constants defined in the IFAUTO module:

  • AUTO_ARG_IN: The argument's value is read by the called method, but not written. This is the default value if intent_arg is not specified.

  • AUTO_ARG_OUT: The argument's value is written by the called method, but not read.

  • AUTO_ARG_INOUT: The argument's value is read and written by the called method.

When the value of intent_arg is AUTO_ARG_OUT or AUTO_ARG_INOUT, the variable used in the value argument should be declared using the VOLATILE attribute. This is because the value of the variable will be changed by the subsequent call to AUTOInvoke. The compiler's global optimizations need to know that the value can change unexpectedly.

type

The variant type of the argument. Must be one of the following constants defined in the IFWINTY module:

VARIANT Type

Value Type

VT_I1

INTEGER(1)

VT_I2

INTEGER(2)

VT_I4

INTEGER(4)

VT_R4

REAL(4)

VT_R8

REAL(8)

VT_CY

REAL(8)

VT_DATE

REAL(8)

VT_BSTR

CHARACTER*(*)

VT_DISPATCH

INTEGER(4)

VT_ERROR

INTEGER(4)

VT_BOOL

LOGICAL(2)

VT_VARIANT

TYPE(VARIANT)

VT_UNKNOWN

INTEGER(4)

Example

See the example in COMInitialize.