LOTUSSCRIPT 言語
メモ IsNull(...) 関数とオブジェクト参照変数の引数を一緒に使用しないでください。そのようにすると、常に False が返されます。
次の例では、オブジェクト参照をテストしています。
Class MyClass '... End Class Dim x As MyClass Dim y As MyClass Dim z As New MyClass Dim other As New MyClass Set x = z If (x Is z) Then Print "Both x and z refer to the same object." If (y Is NOTHING) Then Print "y is NOTHING.It refers to no object." If (z Is other) Then Print "This should not print; z and other are" & _ " different objects." End If
制御ステートメントの流れの中で Is 演算子を使用することもできます。たとえば、次のように Do ステートメントの中で使用します。
Dim a As New MyClass, b As MyClass ' ... Do While b Is NOTHING ' The condition b is NOTHING. ' Condition is either True or False. ' ... Set b = a Loop
クロスリファレンス
LotusScript 言語の組み込み定数
オブジェクト参照変数を操作する
関連項目