[Progress Communities] [Progress OpenEdge ABL] Forum Post: Can a method return an indeterminate array?

  • Thread starter Thread starter Jeff Ledbetter
  • Start date Start date
Status
Not open for further replies.
J

Jeff Ledbetter

Guest
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.

Continue reading...
 
Status
Not open for further replies.
Back
Top