Hi.
The documentation has the example (below) for passing indeterminate arrays.
DEFINE VARIABLE x AS INTEGER EXTENT. RUN foo (OUTPUT x). PROCEDURE foo: DEFINE OUTPUT PARAMETER x AS INTEGER EXTENT. EXTENT(x) = 4. /* Fixes the extent to 4 */ END.
Doing something similar for a method though doesn't seem to work.
"** An array was specified in an expression, on the right-hand side of an assignment, or as a parameter when no array is appropriate or expected. (361)"
DEFINE VARIABLE cList AS CHARACTER EXTENT. myObject = NEW Object(). cList = myObject:getList().
/* method from class */
METHOD PUBLIC CHARACTER EXTENT getList (): DEFINE VARIABLE cList AS CHARACTER EXTENT NO-UNDO. EXTENT(cList) = 4. RETURN cList. END METHOD.
Yes, it should work, What version are you running with? I tried 11.7 for instance with your sample and it compiled fine.
Ah. We now see the error of our ways.
And the error of your ways was....? Are you going to leave us hanging? HA HA.
Stupidity in our test code. I'll leave it there. :)