Skip to main content


Converts a $DOUBLE floating point number to an eight-byte string.




Argument Description
n An IEEE-format floating point number. It can be specified as a value, a variable, or an expression.


$ZDCHAR returns an eight-byte (quad) character string corresponding to n. The bytes of the character string are presented in little-endian byte order, with the least significant byte first.

The number n can be a positive or negative IEEE floating point number. If n is not numeric, $ZDCHAR returns the empty string. For further details on IEEE floating point numbers, refer to the $DOUBLE function.


The following examples return an eight-byte string corresponding to the IEEE floating point number:

   WRITE $ZDCHAR($DOUBLE(1.400000000000001))

These two functions return: "ffffffö?" and "kfffffö?"


$ZDCHAR and Other $CHAR Functions

$ZDCHAR converts an IEEE floating point number to a eight byte (64-bit) character string. $ZQCHAR converts an integer to an eight byte (64-bit) character string. To convert an integer to an 8-bit character string use $CHAR. To convert an integer to a 16-bit (wide) character string use $ZWCHAR. To convert an integer to a 32-bit (long) character string use $ZLCHAR.

See Also

FeedbackOpens in a new tab