Value

Value is a keyword used after a Subprog or a Func declaration, to define the type of arguments transmitted to the called code.

The declaration of the arguments is not mandatory. This allows to transmit parameters with a variable type to subprograms. If they are present, the declarations must be placed just after the Subprog or Func declaration.

Value arguments as copied in the local variable class are associated with the call level nesting. Any modification done on the arguments is not transmitted to the variable transmitted in the call.

Syntax

Value DECLARATION1 NAME(DIMENSIONS)Value DECLARATION2 NAME(SIZE)(DIMENSIONS)Value Instance NAME Using CLASSValue Instance NAME(DIMENSIONS) Using CLASS

The dimensions and the index ranges can be omitted wherever the parenthesis is present. The dimension and index ranges are defined by the calling program. Also, the first range of an index can only be given. The total number of values is defined by the calling program.

Examples

Subprog STORE_VALUES(KEYS,VALUES,IDENTIFIER,GLOBAL_STATUS)Value Char KEYS(20)(1..) : # Array of 20 characters starting at index 1Value Decimal VALUES(,) : # 2 dimensions matrix of decimalsValue Char IDENTIFIER()Value Integer GLOBAL_STATUS : # Integer

Comments

Transmitting large variables declared with Value can be harmful in terms of performance. If the values transmitted must be protected from modifications, it is also possible to use Const for the declarations. The variables transmitted will then be in read-only mode.

See also

Global, Local, Variable, Const, Tinyint, Libelle, Date, Shortint, Integer, Float, Double, Decimal, Char, Schar, Clbfile, Blbfile, Uuident, Datetime, Instance.