Skip to main content

$ZBITGET (legacy function)

Bitstring function – GET.

Synopsis

$ZBITGET(bitstring, position)

Parameters

Argument Description
bitstring The bitstring to be evaluated.
position Value or expression that evaluates to a positive integer.

Description

This page describes the legacy function $ZBITGET. It is described here for compatibility with legacy applications.

$ZBITGET returns the bit value (0 or 1) at the specified bit position within bitstring. The first bit position is 1.

Parameters

position

Value 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 than the length ofbitstring, a <FUNCTION> error occurs.

Examples

Given 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 <FUNCTION> error.

See Also

FeedbackOpens in a new tab