Consultor Eletrônico



Kbase P56304: 4GL. How to compare two array variables
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   26/11/2003
Status: Unverified

GOAL:

4GL. How to compare two array variables

FIX:

This code compare two different arrays:

/* a and b are the two arrays to be compared */

DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE lgSame AS LOGICAL INITIAL YES NO-UNDO.

DO i = 1 TO EXTENT(a) :
IF NOT a[i] = b[i] THEN
lgSame =NO.
END.

/* lgSame contains now the camparison result */