5. Embedded QUEL for Ada : Ada Variables and Data Types : Variable and Type Declarations : Renaming Variables
 
Share this page                  
Renaming Variables
The syntax for renaming variables is:
identifiertype_name renames declared_object;
Syntax Notes:
1. The type_name must be a predeclared type, and the declared_object must be a known EQUEL variable or constant.
2. The declared_object must be compatible with the type_name in base type, array dimensions and size.
3. If the declared object is a record component, any subscripts used to qualify the component are ignored. For example, both of the following rename statements will be accepted even though one of them must be wrong, depending on whether "emprec" is an array:
## eage1: Integer renames emprec(2).age;
## eage2: Integer renames emprec.age;