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?

変数

Caché Basic 変数は変動します。オプションとして、Dim を使用して宣言します。割り当てられない変数の値は空文字列 ("") です。

x = 4 + 2
println "result = ", x
println "the empty string = ",y

Option Explicit を指定し変数を宣言すると便利です。コンパイル時、スタジオは未宣言のまま使用されている変数にフラグを立てます。

サブルーチン外あるいは関数外で宣言されたモジュール・レベルの変数は、ルーチンに対してグローバルです。 サブルーチン内あるいは関数内で宣言された場合はローカルです。

FeedbackOpens in a new tab