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.

Legacy Commands and Functions$ZBITSET returns a permutation of bitstring in which the bit at position is set to truthval(0or 1).ParameterspositionPositive integer that specifies a location in bitstring. It can be specified as a value, a variable,or an expression. Bits are counted left-to-right, with the first bit counted as number 1.truthvalSingle-bit binary value (0 or 1).ExampleThe following example creates a bitstring using $ZBITSTR, then sets a bit using $ZBITSET.SET bitstring=$ZBITSTR(5,0)SET newbitstring=$ZBITSET(bitstring,3,1)If bitstring=[0,0,0,0,0], position=3, and truthval=1, then the result of $ZBITSET would bea bitstring with the value [0,0,1,0,0].See Also• $BIT function• $ZBITGET (legacy function)$ZBITSTR (legacy function)Bitstring function – STRING.$ZBITSTR(size,truthval)ParameterssizetruthvalPositive integer.Optional — Specifies a binary value (0 or 1) for the returned bits.764 <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!