From its conception, Ada was designed to support interfacing with code originating in other programming languages.
In Ada 83, pragma Interface provided the standardized way of accessing entities originating outside the Ada world. Unfortunately, many aspects of the access was implementation defined and there was no standardized way of making Ada entites accessible outside the Ada world.
These shortcomings were addressed by the introduction of the pragmas Import and Export. Their names and most aspects of them were standardized by Ada 95 to ensure a far better portability across platforms and compiler systems. Using pragma Import and Export, it is possible to write highly portable interfaces to standardized languages such as C (and the C subset of C++) and Fortran. With the Ada 95 standardization of pragma Import and Export, pragma Interface was removed as a language defined pragma.
In spite of this, knowledge about the Ada 83 interface solutions is still relevant. Either when migrating from Ada 83 to Ada 95 or in connection with maintenance of Ada source code which is used in both Ada 83 and 95 applications.
SCORE Ada supports a number of implementation defined interfacing pragmas for compatibility with different Ada 83 dialects. These compatibility pragmas are internally handled as equivalents of pragma Import or Export. The following describe these equivalences.
pragma Interface( assembler_convention, Entity ) is equivalent to pragma Import( Assembler, Entity ) for assembler_convention in { As, Asm86, Asm_Acf, Asm_Noacf, Assembler, Assembly }
pragma Interface( Ada, Entity ) is equivalent to pragma Import( Ada, Entity )
pragma Interface( c_convention, Entity ) is equivalent to pragma Import( C, Entity ) for c_convention in { C, C86, C_Acf, C_Noacf }
Customer Quote:
"DDC-I has a good solution for us and your willingness to get down to the issues and help us get what we need has made it a clear choice."