IS
Result = Expression [ NOT ] IS Class
如果一个对象是一个类的实例或者继承,返回真(
TRUE)。
如果指定
NOT,测试结果取反。
-
Expression 是一个返回对象引用的表达式。
-
Class 是一个类名。
示例
PRINT ["Gambas", "rules!"] IS String[]
DIM myTextBox AS NEW TextBox(ME)
PRINT myTextBox IS Control
PRINT ["Gambas", "rules!"] IS Collection
示例
PRINT ["Gambas", "rules!"] Not Is Collection
参见