Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
X2D (Hexadecimal to Decimal) z/OS TSO/E REXX Reference SA32-0972-00 |
|
>>-X2D(hexstring--+----+--)------------------------------------>< '-,n-' returns the decimal representation of hexstring. The hexstring is a string of hexadecimal characters. If the result cannot be expressed as a whole number, an error results. That is, the result must not have more digits than the current setting of NUMERIC DIGITS. You can optionally include blanks in hexstring (at byte boundaries only, not leading or trailing) to aid readability; they are ignored. If hexstring is null, the function returns 0. If you do not specify n, hexstring is processed as an unsigned binary number. Here are some examples:
If you specify n, the string is taken as a signed number expressed in n hexadecimal digits. If the leftmost bit is off, then the number is positive; otherwise, it is a negative number in two's complement notation. In both cases it is converted to a whole number, which may, therefore, be negative. If n is 0, the function returns 0. If necessary, hexstring is padded on the left with 0 characters (note, not “sign-extended”), or truncated on the left to n characters. Here are some examples:
Implementation maximum: The input string may not have more than 500 hexadecimal characters that will be significant in forming the final result. Leading sign characters (0 and F) do not count towards this total. |
Copyright IBM Corporation 1990, 2014
|