![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Ada Programming in Open Systems Programming in Ada in an open-systems environment provides the opportunity to interconnect a variety of tools, languages, and platforms. For example, you can:
- Send data between Ada programs using nonstandard methods. Data passing from Rational Ada code is described in Passing Data Between Ada Programs.
- Write a program that combines Ada code with code written in other languages. Multi-language programming with Rational Ada is described in Interfacing with Other Languages.
- Optimize code using compiler-supplied capabilities or platform-specific capabilities. Rational Ada optimizations are described in Optimizing Code.
- Create interrupt handlers for interrupts generated by the target platform.This process is described in the Ada Runtime Guide.
- Write Ada code to be purely portable or to take advantage of vendor-implemented features. The Ada 83 Reference Manual for the Ada Programming Language (LRM) Appendix F for Rational Ada is provided in Ada 83 LRM Appendix F: Implementation-Dependent Characteristics. The Ada 95 Reference Manual for the Ada Programming Language (LRM) Annex M for Rational Ada is provided in Ada 95 LRM Annex M: Implementation-Dependent Characteristics.
Along with this flexibility comes the requirement to create programs that work within the constraints of a variety of interrelated tools. For example:
- Ada, C, C++, and other languages each have their own methods for storage allocation and parameter passing. Constraints of multilanguage programming are described Interfacing with Other Languages.
- UNIX provides system calls and library routines that are incompatible with the restrictions of the LRM or of an Ada implementation that conforms to the LRM. UNIX restrictions when programming in Rational Ada are described in UNIX Restrictions.
- Ada tasking imposes certain constraints on your program. Ada tasking is described in detail in the Ada Runtime Guide.
Passing Data Between Ada ProgramsAda programs occasionally need to pass data back and forth through some method other than standard parameter passing. For example, using customized storage-management utilities or sending across a network. In such cases, the programs that send and receive the data need information on the format of the data to ensure that they agree on how to interpret it. Rational Ada provides attributes for data types that can be used to reconstruct data by the receiving Ada program.
To identify the format of data, you should be able to identify the platform and compiler version used to generate the data. The following attributes are provided to do this:
- 'Compiler_Key. Identifies the Rational Apex compiler key, identifying the platform and target compiler
- 'Compiler_Version. Identifies the version of the specified compiler
For assistance in the translation of data in different representations, use:
- 'Type_Key. Provides a unique identification for the specified type
- 'Dope_Address. Specifies the location of the dope vector used in conjunction with certain array and record subtypes
- 'Dope_Size. Specifies the storage size of the dope vector used in conjunction with certain array subtypes
These attributes are described in the following sections:
- Ada 83: Implementation-Defined Attributes
- Ada 95: Implementation-Defined Attributes
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2004, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |