Rexx has functions for manipulating lists of words - Words() and Word() coming immediately to mind. If your application makes data available as lists of words, it will be simple for the script writer to manipulate.
This is the quick, easy way to return data. It's an ARexx standard, and script writers should be familiar with it.
For data that doesn't fit well into a list of words, using an stemmed variable allows passing arbitrary data. If there's no obvious way of indexing the stemmed variable, put the data in "stemname.1", "stemname.2", etc. The count can go in either "stemname.0" or "stemname". I prefer stemname.0, as that leaves the script writer "stemname" for their own uses.
Since you can't return stemmed variables via RESULT in a single call, use the ARexx Variable Interface. This allows you to set variables by name in the running ARexx script. Since the user can't copy stemmed variables, always let the user choose the name of the variable to hold the data.
On to Intuition, back to the user, or up to nouns.
Mike W. Meyer