Consultor Eletrônico



Kbase P102871: Error (11389) when attempting to assign a value to an indeterminate array element
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/12/2005
Status: Verified

FACT(s) (Environment):

OpenEdge 10.x

SYMPTOM(s):

Error (11389) when trying to assign a value to an indeterminate array element

Invalid assignment to an unfixed indeterminate extent (11389)

CAUSE:

The indeterminate extent being referenced has not been set to a fixed dimension. Values cannot be assigned to the extent until its dimension has be fixed

FIX:

In order to assign a value to an indeterminate array element, one has to first make the dimension of the array variable fixed by passing it to a function or a procedure that defines an input or output parameter as a fixed extent. e.g.:


DEFINE VARIABLE X AS CHARACTER EXTENT.
RUN proc (OUTPUT x).
X[1] = "test":U.
MESSAGE X[1]
VIEW-AS ALERT-BOX INFO BUTTONS OK.
PROCEDURE proc.
DEFINE OUTPUT PARAMETER y AS CHARACTER EXTENT 3 NO-UNDO.
END PROCEDURE.