Consultor Eletrônico



Kbase P14509: How to define a character variable using the initial value of a input parameter
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/15/2008
Status: Verified

GOAL:

How to define a character variable using the initial value of a input parameter

FIX:

It is illegal to use the VALUE() function in the INITIAL phrase of the DEFINE VARIABLE statement as a means of initializing a variable to the value of an input parameter

The proper way to initialize the variable is using ASSIGN statement after the definition of the variable doing something like:

DEFINE INPUT PARAMETER X AS INTEGER.
DEFINE VARIABLE Y AS INTEGER.

ASSIGN Y = X.