Ada Programming/Pragmas/Export

Summary
The pragma Export directs the compiler to make available subprograms or data objects written in Ada to foreign computer languages. If a subprogram is exported, it is compiled with conventions expected by the foreign language. For example, if a subprogram is being exported to C, record types declared in the subprogram are compiled the same as C-style structs.

The set of supported foreign languages depends on the compiler implementation. Typically C, C++, Cobol, and Fortran are supported.

Example
main { My_Int; adainit; My_Int = My_Ada_Function; adafinal; 0; }

My_Ada_Function Integer 1; My_Ada_Function; (Convention   => C,  Entity        => My_Ada_Function,  External_Name => "My_Ada_Function" );

Wikibook

 * Ada Programming
 * Ada Programming/Pragmas
 * Ada Programming/Pragmas/Import
 * Ada Programming/Pragmas/Convention
 * Ada Programming/Pragmas/Linker_Options
 * Ada Programming/Pragmas/External (implementation defined)

|Export Export Export