DocAda(tm) is a productivity tool of KSCE

Prev | Up | Next | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

B.2 The Package Interfaces

Package Interfaces is the parent of several library packages that declare types and other entities useful for interfacing to foreign languages. It also contains some implementation-defined types that are useful across more than one language (in particular for interfacing to assembly language).

Static Semantics

The library package Interfaces has the following skeletal declaration:

   
       package Interfaces is
          pragma Pure(Interfaces);

          type Integer_n is range -2**(n-1) .. 2**(n-1) - 1;  --2's complement

          type Unsigned_n is mod 2**n;

          function Shift_Left  (Value : Unsigned_n; Amount : Natural) return Unsigned_n;
          function Shift_Right (Value : Unsigned_n; Amount : Natural) return Unsigned_n;
          function Shift_Right_Arithmetic (Value : Unsigned_n; Amount : Natural)
             return Unsigned_n;
          function Rotate_Left  (Value : Unsigned_n; Amount : Natural) return Unsigned_n;
          function Rotate_Right (Value : Unsigned_n; Amount : Natural) return Unsigned_n;
          ...
       end Interfaces;

Implementation Requirements

An implementation shall provide the following declarations in the visible part of package Interfaces:

Implementation Permissions

An implementation may provide implementation-defined library units that are children of Interfaces, and may add declarations to the visible part of Interfaces in addition to the ones defined above.

Implementation Advice

For each implementation-defined convention identifier, there should be a child package of package Interfaces with the corresponding name. This package should contain any declarations that would be useful for interfacing to the language (implementation) represented by the convention. Any declarations useful for interfacing to any language on the given hardware architecture should be provided directly in Interfaces.

An implementation supporting an interface to C, COBOL, or Fortran should provide the corresponding package or packages described in the following clauses.

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
Prev | Up | Next | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com