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?

$Increment 関数

これまで学習してきた配列の構造や機能はユニークであるため、使用法に関して説明が必要でしょう。これらを整理するため、例として mydatent ルーチンにストレージ・プロシージャを記述します。ここでは $Increment 関数を使用します。$Increment 関数は変数を取得し、値をインクリメント (変更) して返します。インクリメントは正でも負の数でも可能です。この例では、既定で 1 をインクリメントしています。

Note:

$Increment 関数は、その第 1 引数値を変更します。

SAMPLES>write a

WRITE a
^
<UNDEFINED> *a
SAMPLES>write $increment(a)
1
SAMPLES>write $increment(a)
2
SAMPLES>write $increment(a,2)
4
SAMPLES>write a
4
SAMPLES>
FeedbackOpens in a new tab