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.

ParameterspositionValue or expression that evaluates to a positive integer. Bit positions are counted left-to-right,with the first bit counted as number 1. If position is set to zero, or to an integer larger thanthe length ofbitstring, a error occurs.ExamplesGiven the bitstring [0,0,1,1,0]:If position=1, then the result of $ZBITGET would be 0.If position=2, then the result of $ZBITGET would be 0.If position=3, then the result of $ZBITGET would be 1.If position=4, then the result of $ZBITGET would be 1.If position=5, then the result of $ZBITGET would be 0.If position=6, then $ZBITGET would generate a error.See Also• $BIT function• $ZBITSET (legacy function)$ZBITLEN (legacy function)$ZBITLEN (legacy function)Bitstring function – LENGTH.$ZBITLEN(bitstring)DescriptionThis page describes the legacy function $ZBITLEN. It is described here for compatibilitywith legacy applications.$ZBITLEN returns the number of bits in bitstring.ExampleIf bitstring=[0,0,1,1,0], then the result of $ZBITLEN would be the length 5.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 761

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

Saved successfully!

Ooh no, something went wrong!