Next: Pragma CPP_Class, Previous: Pragma Component_Alignment, Up: Implementation Defined Pragmas
pragma Convention_Identifier ( [Name =>] IDENTIFIER, [Convention =>] convention_IDENTIFIER);
This pragma provides a mechanism for supplying synonyms for existing
convention identifiers. The Name
identifier can subsequently
be used as a synonym for the given convention in other pragmas (including
for example pragma Import
or another Convention_Identifier
pragma). As an example of the use of this, suppose you had legacy code
which used Fortran77 as the identifier for Fortran. Then the pragma:
pragma Convention_Identifier (Fortran77, Fortran);
would allow the use of the convention identifier Fortran77
in
subsequent code, avoiding the need to modify the sources. As another
example, you could use this to parameterize convention requirements
according to systems. Suppose you needed to use Stdcall
on
windows systems, and C
on some other system, then you could
define a convention identifier Library
and use a single
Convention_Identifier
pragma to specify which convention
would be used system-wide.