Product Site

5.1.7.87. sign

Returns a number that indicates the sign of the receiving string, which is a number. The receiving string is first rounded according to standard Rexx rules, as though the operation receiving_string+0 had been carried out. It returns -1 if the receiving string is less than 0, 0 if it is 0, and 1 if it is greater than 0.
Example 5.123. String class — sign method
"12.3"~sign       -->     1
" -0.307"~sign    -->    -1
0.0~sign          -->     0