pragma Export_Function

Name

Export_Function -- 

Synopsis

pragma Export_Function (
     [Internal         =>] LOCAL_NAME,
  [, [External         =>] EXTERNAL_SYMBOL]
  [, [Parameter_Types  =>] Parameter_TYPES]
  [, [Result_Type      =>] result_SUBTYPE_MARK]
  [, [Mechanism        =>] MECHANISM]
  [, [Result_Mechanism =>] MECHANISM_NAME]);

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

Use this pragma to make a function externally callable and optionally provide information on mechanisms to be used for passing parameter and result values. We recommend, for the purposes of improving portability, this pragma always be used in conjunction with a separate pragma Export, which must precede the pragma Export_Function. XGC Ada does not require a separate pragma Export, but if none is present, it assumes Convention C. Pragma Export_Function (and Export, if present) must appear in the same declarative region as the function to which they apply.

internal_name must uniquely designate the function to which the pragma applies. If more than one function name exists of this name in the declarative part you must use the Parameter_Types and Result_Type parameters is mandatory to achieve the required unique designation. subtype_ marks in these parameters must exactly match the subtypes in the corresponding function specification, using positional notation to match parameters with subtype marks.