Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I/B)

 

 

 

 

 

Warning: This instruction must be used in the description of a macro-instruction, a program template or a management rule. It is accepted in Visual Adelia or in Adelia Web if it is placed in a management rule with an ADELIA-compatible source type.

 

Section for use

All

 

Syntax

DECLARE_ARRAY Array;GuideWord Length;NbDecimals NumericType Dimension1;Dimension2 Parameter

DECLARE_ARRAY Array;GuideWord Type Dimension1;Dimension2 Parameter

 

GuideWord

Þ

GuideWord | None

 

 

 

NbDecimals

Þ

Integer | None

 

 

 

Dimension2

Þ

Integer | None

 

 

 

Parameter

Þ

*NODEF | None

 

 

 

Type

Þ

L | T | Z | *

 

 

 

NumericType

Þ

B | I | U | None

 

Description

This instruction is used to declare an array.

 

The following must be declared:

    • the name of the array,

    • its guide word,

    • its length or its type (L for a DATE type field, T for a TIME type field, Z for a TIMESTAMP type field and * for pointer),

    • its number of decimals (not mandatory),

    • the numerical type (B for binary, I for integer, U for unsigned integer) (not mandatory),

    • the array dimension (the result of Dimension1 * Dimension2 must be less than or equal to 32767),

    • *NODEF, so that this definition is not generated in the 3GL.

Notes:

    • If the variable is already declared with the same characteristics, it is not defined again.
    • The declaration of the types DATE, TIME, TIMESTAMP, INTEGER, UNSIGNED INTEGER and POINTER, is only compatible with the RPG generator.


Example

DECLARE_ARRAY WARRAY;W_ARRAY 15;2 10

DECLARE_ARRAY WARRY2;W_ARRAY_2 5;0 10;15

J = 1

I = 0

DO_WHILE I < 10

I = I + 1

W_ARRAY(I) = W_ARRAY_2(I,J)

REDO

 

See also the list of 4GL instructions by topic

↑ Top of page

  • Aucune étiquette