Product Site

5.1.7.57. d2c

Returns a string, in character format, that is the ASCII representation of the receiving string, a decimal number. If you specify n, it is the length of the final result in characters; leading blanks are added to the returned string. The n must be a positive whole number or zero.

The receiving string must not have more digits than the current setting of NUMERIC DIGITS.

If you omit n, the receiving string must be a positive whole number or zero, and the result length is as needed. Therefore, the returned result has no leading "00"x characters.
Example 5.95. String class — d2c method
"65"~d2c       -->   "A"      /* "41"x is an ASCII "A"    */
"65"~d2c(1)    -->   "A"
"65"~d2c(2)    -->   " A"
"65"~d2c(5)    -->   "    A"
"109"~d2c      -->   "m"      /* "6D"x  is an ASCII "m"   */
"-109"~d2c(1)  -->   "ô"      /* "93"x  is an ASCII "ô"   */
"76"~d2c(2)    -->   " L"     /* "4C"x  is an ASCII " L"  */
"-180"~d2c(2)  -->   " L"