Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


REVERSE

The REVERSE function returns a character string of exactly the same length as the argument, whose characters are exactly the same as those specified in the argument except that they are in reverse order. For arguments of type national, character positions are reversed.

The function type depends on the type of the argument, as follows:

Argument type Function type
Alphabetic Alphanumeric
Alphanumeric Alphanumeric
National National
Read syntax diagramSkip visual syntax diagram
Format

>>-FUNCTION REVERSE--(--argument-1--)--------------------------><

argument-1
Must be class alphabetic, alphanumeric, or national and must be at least one character in length.

The returned value is a character string of the same length as argument-1, with the characters of argument-1 in reversed order. For example, if argument-1 contains ABC, the returned value is CBA.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)