The method signature enables you to specify passing parameters and returning items within the header of certain elements. You must omit the procedure division header within the method if you use this signature.
signature
- Each parameter must specify a parameter passing mode before it, otherwise passing mode defaults to by VALUE.
- If you are passing a parameter by PARAMS, it must be last, and must be a one-dimensional array.
- Indexers or constructors cannot specify returning items.
- Iterators specify YIELDING items, not RETURNING items
Example
method-id myMethod (evenNums AS binary-long) RETURNING itRes AS string.
...
end method.
iterator-id GetEven yielding res as binary-long static.
...
end iterator.