docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  ObjectScript Reference

ObjectScript Reference
$ZQCHAR
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Converts a number to an eight-byte string.
Synopsis
$ZQCHAR(n)
$ZQC(n)
Parameter
n An integer in the range -9223372036854775808 through 9223372036854775807. It can be specified as a value, a variable, or an expression.
Description
$ZQCHAR returns an eight-byte (quad) character string corresponding to the binary representation of n. The bytes of the character string are presented in little-endian byte order, with the least significant byte first.
$ZQCHAR issues a <FUNCTION> error if n is invalid.
Example
The following example returns the eight-byte string for the integer 7523094288207667809:
   WRITE $ZQCHAR(7523094288207667809)
returns: “abcdefgh”
Notes
$ZQCHAR and $CHAR
$ZQCHAR is similar to $CHAR except that it operates on eight byte (64-bit) words instead of single 8-bit bytes. For 16-bit words use $ZWCHAR; for 32-bit words, use $ZLCHAR.
$ZQCHAR and $ZQASCII
$ZQASCII is the logical inverse of the $ZQCHAR function. For example:
   WRITE $ZQCHAR(7523094288207667809)
returns: abcdefgh
   WRITE $ZQASCII("abcdefgh")
returns: 7523094288207667809
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-16 05:50:13