CONST |
Const allows you to declare a subroutine's parameters by specifying that they are passed by address, but without ability to modify.
Const type_word dim_var_list
|
Element |
Description |
Restrictions |
|
type_word |
One of the keywords used for
the declarations: |
This must be one of Adonix's types. |
|
dim_var_list |
dim_var list separated by the comma (,) |
None |
|
dim_var |
Variable expressed in one of
the following |
None |
|
var_name |
variable_name |
None |
|
sep_list |
List of comma (,) separators |
Not more than three separators, because the number of dimensions is limited to four |
# Declaration of parameters of a Call Subprog SOUS_TRAIT(ARGUMENT1, ARGUMENT2, ARGUMENT3)Const Integer ARGUMENT1(,,) :# ARGUMENT1 is a table with three dimensions
Const Char ARGUMENT2()(,) :# ARGUMENT2 is a table with two dimensions
Const Date ARGUMENT3 :# ARGUMENT3 is a date (with no dimensions)
Const allows you to declare that the parameters of a subroutine are passed by address, but will not be able to be modified by the subroutine. The variables declared accordingly are only accessible in read mode.
|
Error |
Description |
|
ERMODE (10) |
Incompatibility of type between the declaration of the parameter and the parameter passed in the Call |
|
ERDIM (55) |
The number of dimensions declared does not correspond to the dimension of the variable passed in parameters. |
|
ERARGTY (70) |
The parameter passed to the Call is an expression; it can only be passed by value. |
SHORTINT - DECIMAL - CHAR - DATE - INTEGER - LIBELLE - VALUE - VARIABLE - SUBPROG - CALL
|
|