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.

$ZBITFIND (legacy function)$ZBITCOUNT returns the number of ON bits (1' s) in bitstring.ExampleIf bitstring = [0,0,1,1,0], then the result of $ZBITCOUNT would be 2.See Also• $BITCOUNT function$ZBITFIND (legacy function)Bitstring function – FIND.$ZBITFIND(bitstring, truthval, position)ParametersbitstringtruthvalpositionA bit string.Binary value (0 or 1).Optional — Specifies a starting bit position in bitstring.DescriptionThis page describes the legacy function $ZBITFIND. It is described here for compatibilitywith legacy applications.$ZBITFIND returns the position immediately after the first bit in bitstring that equals truthval.position specifies an optional starting position for the search. If position is omitted, the searchstarts at position 1.If truthval is not found, $ZBITFIND returns zero.$ZBITFIND is similar to the $FIND function in that the returned position is the next oneafter the matching bit. This permits a loop of the form:FindabitFOR p=1:0 {SET p=$ZBITFIND(bstring,1,p)QUIT:´pDO Foundone}Foundone<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 759

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

Saved successfully!

Ooh no, something went wrong!