Syntax

You can get an instance of a Progress.Lang.ParameterList class using the NEW statement. This is the syntax for creating a Progress.Lang.ParameterList instance.

parameterlist-object = NEW Progress.Lang.ParameterList(n).

Element descriptions for this syntax diagram follow:

parameterlist-object
An instance of the Progress.Lang.ParameterList object.
n
An INTEGER expression indicating the number of parameters that the object contains. The argument must be greater than or equal to zero. A value of zero indicates that the method or constructor to which the Progress.Lang.ParameterList object is to be passed does not take any parameters. If a negative value is specified, the AVM raises a run-time error.

In this example, the rDynObj object is an instance of the class specified by pcDynObjTypeName, which in this case might have been CustomerObj, or OrderObj, or any other derived class of BusinessObject:

DEFINE INPUT PARAMETER pcDynObjTypeName AS CHARACTER NO-UNDO.

VAR INT iConstParam = 1000.
VAR CLASS BusinessObject rDynObj.
VAR CLASS Progress.Lang.Class rObjClass.
VAR CLASS Progress.Lang.ParameterList rParamList.

ASSIGN
  rObjClass  = Progress.Lang.Class:GetClass(pcDynObjTypeName)
  rParamList = NEW Progress.Lang.ParameterList(1).

rParamList:SetParameter(1, "INTEGER", "INPUT", iConstParam).
rDynObj = CAST(rObjClass:New(rParamList), BusinessObject).