Formal Parameter Declarations
An EQUEL/Ada formal parameter declaration has the following syntax:
identifier {, identifier} :
[in | out | in out]
type_name
[:= default_value]
[;]
In a subprogram declaration, its syntax is:
procedure name ( parameter_declaration {; parameter_declaration} )
is
...
or
function name ( parameter_declaration {; parameter_declaration} )
return type_name is
...
Syntax Notes:
1. If the in mode alone is specified, the declared parameters are considered constants and cannot be targets of Ingres assignments.
2. If no mode is specified, the default in mode is used and the declared parameters are considered constants.
3. The type_name must be either an EQUEL/Ada type or a type name already declared to EQUEL.
4. The default_value is not parsed by the preprocessor. Consequently, any default value is accepted, even if it may cause a later Ada compiler error. For example, both of the following parameter defaults are accepted, even though only the first is legal in Ada:
## procedure Load_Table
## (clear_it: in Boolean := TRUE;
## is_error: out Boolean := "FALSE") is
...
You must not use a single quote in a default value to specify an Ada attribute. EQUEL will treat it as the beginning of a string literal and will generate an error.
5. The semicolon is required with all parameter declarations except the last.