10.3 Declarations10.3 Declarations
10 C++ translator 10 C++ translator
10.5 Class expressions 10.5 Class expressions
10.4 Variable declarations

10.4 Variable declarations

A variable declaration translates to a sequence of variable declarations corresponding to its variable definitions.
                                     
 variable n1, n2 : Int, z1, z2 : Complex, seq : Int*, f : IntInt

translates to

int n1;
int n2;
Complex z1;
Complex z2;
RSL_lI seq;
RSL_IfI f;

Note that in RSL the initial values of these variables are underspecified within their (sub)types. In C++ the variables will be uninitialised.

An initialisation of a variable translates to the corresponding C++ initialisation. Additional code, included if RSL_pre is defined, is generated if any types of initialised variables are subtypes, to check that the initial values are in the subtypes.

10.4.1 Channel declarations

Not accepted.

10.4.2 Axiom declarations

Not accepted.
Chris George, April 17, 2008

10.4 Variable declarations
10.3 Declarations10.3 Declarations
10 C++ translator 10 C++ translator
10.5 Class expressions 10.5 Class expressions