Skip to main content

$ZDCHAR (ObjectScript)

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

Synopsis

$ZDCHAR(n)
$ZDC(n)

Argument

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

Description

$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.

Example

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

   WRITE $ZDCHAR($DOUBLE(1.4)),!
   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) quad character string.

  • To convert an integer to a 64-bit (quad) character string use $ZQCHAR.

  • To convert an integer to a 32-bit (long) character string use $ZLCHAR.

  • To convert an integer to a 16-bit (wide) character string use $ZWCHAR.

  • To convert an integer to an 8-bit character string use $CHAR.

See Also

FeedbackOpens in a new tab