DDC-I Logo

Sitemap  

DDC-I Ada Compiler System  
The Ada Business of Importing and Exporting

Product Family: SCORE
Target CPU: PC/Windows, SPARC/Solaris, 1750A, i960, PowerPC
Language: Ada
Host: PC/Windows, Sparc/Solaris

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.

  1. pragma Interface( assembler_convention, Entity ) is equivalent to
    pragma Import( Assembler, Entity )
    for assembler_convention in { As, Asm86, Asm_Acf, Asm_Noacf, Assembler, Assembly }

     
  2. pragma Interface( Ada, Entity ) is equivalent to
    pragma Import( Ada, Entity )

     
  3. pragma Interface( c_convention, Entity ) is equivalent to
    pragma Import( C, Entity )
    for c_convention in { C, C86, C_Acf, C_Noacf }

     
  4. pragma Interface( convention, Entity )
    pragma Interface_Spelling( Entity, "link_name" ) is equivalent to
    pragma Import( convention, Entity, Link_Name => "link_name" )

     
  5. pragma Interface( convention, Entity )
    pragma Linkage_Name( Entity, "link_name" ) is equivalent to
    pragma Import( convention, Entity, Link_Name => "link_name" )

     
  6. pragma Linkage_Name( Entity, "link_name" ) without a pragma Interface is equivalent to
    pragma Export( Ada, Entity, Link_Name => "link_name" )

     
  7. pragma External_Name( Entity, "link_name" ) is equivalent to
    pragma Export( Ada, Entity, Link_Name => "link_name" )

 

Contact
602-275-7172
sales@ddci.com

IDIQ Contract Vehicles:
--------------
AMCOM Express
DESP II
F2AST
R23G

Links

Support

Members Area
    -Member Login/Return
    -Login Help

Atlas Support Packages
    -Atlas Premium
    -Atlas Advantage
    -Atlas Choice

Complimentary Support

Submit a Software Trouble Report

Customer Quote:
"Thank you for the excellent support during our evaluation phase... I need to make special mention of Michael, the support and comments he made really put me on the track of finding solutions very fast."