Ordered map element values, being variable length strings or unformatted blobs, may be passed as parameters to functions, procedures and subroutines just as you would an ordinary S,0 (dynamic string) or X,0 (dynamic unformatted blob) variable or expression. But note that since references to ordered map elements are essentially expressions, they're effectively read-only and thus attempts to update them via XPUTARG will have no effect. For example:
call FoldUpper($capitals("california")) ! passes "sacramento"
print $capitals("california") ! (unchanged by procedure)
...
Procedure FoldUpper(name$ as s0)
name$ = ucs(name$)
xputarg 1,name$ ! this doesn’t change calling param
! (if it was an ordered map value)
EndProcedure
There is currently no way to pass an entire ordered map to a function or procedure as a parameter. However, as of A-Shell 6.1.1398 / compiler edit 734, there are a few XCALL subroutines which are capable of receiving and/or returning an entire ordered map, for which case the syntax is the map name with an empty set of parentheses, e.g. $ary(). When applicable, this feature is documented with the subroutine itself; for example, see the CGIUTL opcode CGIOP_GETPARARY.