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.

<strong>Caché</strong> <strong>ObjectScript</strong> FunctionsNote:The $BIT functions replace the earlier $ZBIT functions. New code should only usethe $BIT functions; the $ZBIT functions will continue to be supported for legacyapplications. The $BIT functions and the $ZBIT functions are incompatible; $BITfunctions compress bitstrings, $ZBIT functions do not. Therefore, the two types ofbitstring functions should not be used on the same bitstring.See Also• $BITCOUNT function• $BITFIND function• $BITLOGIC function• $FACTOR function$BITCOUNTReturns the number of bits in a bitstring.$BITCOUNT(bitstring,bitvalue)ParametersbitstringbitvalueThe name of a bitstring. Can be a local variable, a process-privateglobal, or a global.Optional — The value (0 or 1) to count within the bitstring.DescriptionThe $BITCOUNT function counts the number of bits within a bitstring. A bitstring is a stringwhich is interpreted by the system as a series of bits. You can create a bitstring using $BITor $BITLOGIC. There is also general information on bitstring functions available.$BITCOUNT(bitstring) returns the number of bits in bitstring.$BITCOUNT(bitstring, bitvalue) returns the number of bits of type bitvalue (0 or 1) inbitstring.The maximum bitstring length is 262,104 bits (32763 x 8).184 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!