Number Declarations
An EQUEL/Ada number declaration has the following syntax:
identifier {, identifier} :
constant:= initial_value;
Syntax Notes:
1. A number declaration is only allowed for integer numbers. You cannot declare a floating-point number declaration using this format. If you do, EQUEL will treat it as an integer number declaration, causing later compiler errors. For example, the following two number declarations are treated as integer number declarations, even though the second is a float number declaration:
## max_employees: constant := 50000;
## min_salary: constant := 13500.0; --Treated as INTEGER
To declare a constant float declaration, you must use the constant variable syntax. For example, the second declaration above should be declared as:
## min_salary: constant Float := 13500.0; -- Treated as FLOAT
2. The declared numbers cannot be the targets of Ingres assignments.
3. The initial_value is not parsed by the preprocessor. Consequently, any initial value is accepted, even if it may later cause an Ada compiler error. For example, both of the following initializations are accepted, even though only the first is a legal Ada number declaration:
## no_rows: constant := 0;
## bad_num: constant := 123 + "456";
You must not use a single quote in an initial value to specify an Ada attribute. EQUEL will treat it as the beginning of a string literal and will generate an error.