Purpose
Returns a nonvarying string that contains the elements of an expression in reverse order.
Parameters
x is an expression.
Description
REVERSE returns a nonvaying string that contains the elements of an expression
x in reverse order.
x must have a computational type and a string type. If it does not have a string type, it is converted to string (that is, from numeric to bit or character), according to the rules for concatenation.
Examples
dcl s char (40) varying;
s = 'NeverOddOrEven';
s = reverse(s);
put skip list (s);
will print:
nevErOddOreveN
Restrictions
Only flat structure expressions are allowed. Arrays, arrays of structures, and structure member arrays are not yet supported.