pragma Import_Valued_Procedure

Name

Import_Valued_Procedure -- 

Synopsis

pragma Import_Valued_Procedure (
     [Internal                 =>] LOCAL_NAME,
  [, [External                 =>] EXTERNAL_SYMBOL]
  [, [Parameter_Types          =>] Parameter_TYPES]
  [, [Mechanism                =>] MECHANISM]
  [, [First_Optional_Parameter =>] IDENTIFIER]);

EXTERNAL_SYMBOL ::=
  IDENTIFIER
| static_string_EXPRESSION

Parameter_TYPES ::=
  null
| SUBTYPE_MARK {, SUBTYPE_MARK}

MECHANISM ::=
  MECHANISM_NAME
| (MECHANISM_ASSOCIATION {, MECHANISM_ASSOCIATION})

MECHANISM_ASSOCIATION ::=
  [formal_parameter_NAME =>] MECHANISM_NAME

MECHANISM_NAME ::=
  Value
| Reference

Description

This pragma is identical to Import_Procedure except that the first parameter of local_name, which must be present, must be of mode OUT, and externally the subprogram is treated as a function with this parameter as the result of the function. The purpose of this capability is to allow the use of OUT and IN OUT parameters in interfacing to external functions (which are not permitted in Ada functions). You may optionally use the Mechanism parameters to specify passing mechanisms for the parameters. If you specify a single mechanism name, it applies to all parameters. Otherwise you may specify a mechanism on a parameter by parameter basis using either positional or named notation. If the mechanism is not specified, the default mechanism is used.