Make your own free website on Tripod.com
3.2.25. D2C(integer[,length])

Returns a (packed) string, that is the character representation of
integer, which must be a whole number, and is governed by the
settings of NUMERIC, not of the internal precision of the built-in
functions. If length is specified the string returned will be
length bytes long, with sign extension. If length (which must be a
non-negative whole number) is not large enough to hold the result,
an error is reported.

If length is not specified, integer will be interpreted as an
unsigned number, and the result will have no leading <nul>
characters.  If integer is negative, it will be interpreted as a
two’s complement, and length must be specified.

     D2C(0)    –>   ‘’
     D2C(127)  –>   ‘7F’x
     D2C(128)  –>   ‘80’x
     D2C(128, 3)    –>   ‘000080’x
     D2C(-128) –>   ‘80’x
     D2C(-10, 3)    –>   ‘fffff5’x



PREV NEXT