11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$ZLASCII$ZLASCIIReturns the numeric interpretation of a four-byte string.$ZLASCII(string,position)$ZLA(string,position)ParametersstringpositionA string that can be specified as a value, a variable, or an expression.Optional — A starting position in the string. The default is 1.DescriptionThe value $ZLASCII returns depends on the parameters you use.• $ZLASCII(string) returns a numeric interpretation of a four-byte string, starting withthe first character position of string.• $ZLASCII(string,position) returns a numeric interpretation of a four-byte string beginningat the starting position specified by position.Notes$ZLASCII, $ZWASCII, and $ASCII$ZLASCII(string) is similar to $ASCII except that it operates on 32-bit double words insteadof 8-bit bytes. To operate on 16-bit words, use the $ZWASCII function.$ZLASCII(string,position) is the functional equivalent of:$ASCII(string,position+3)*256 + $ASCII(string,position+2)*256 +$ASCII(string,position+1)*256 + $ASCII(string,position)$ZLASCII and $ZLCHARThe $ZLCHAR function is the logical inverse of the $ZLASCII function. For example:SET x=$ZLASCII("abcd")WRITE !,xSET y=$ZLCHAR(x)WRITE !,yGiven “abcd” $ZLASCII returns 1684234849. Given 1684234849 $ZLCHAR returns “abcd”.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 545

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!