Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

$ZBITSET (従来の関数)

ビット文字列関数 – SET

Synopsis

$ZBITSET(bitstring,position,truthval)

パラメータ

bitstring 配置されるビット文字列。
position bitstring 内の位置を指定する正整数。
truthval 1 ビットのバイナリ値 (0 または 1)。

概要

ここでは、従来の関数である $ZBITSET について説明します。ここでは、従来のアプリケーションとの互換性について説明します。

$ZBITSET は、position の位置にあるビットを truthval (0 または 1) に設定した bitstring を置換した文字列を返します。

パラメータ

position

bitstring 内の位置を指定する正整数。値、変数、式として指定することができます。ビットは左から右にカウントされ、最初のビットは 1 となります。

truthval

1 ビットのバイナリ値 (0 または 1)。

以下の例では、$ZBITSTR を使用してビット文字列を作成し、その後 $ZBITSET を使用してビットを配置します。

SET bitstring=$ZBITSTR(5,0)

SET newbitstring=$ZBITSET(bitstring,3,1)

bitstring=[0,0,0,0,0]、position=3、および truthval=1 の場合、$ZBITSET の結果は、値 [0,0,1,0,0] のビット文字列となります。

関連項目

FeedbackOpens in a new tab