IS

Result = Expression [ NOT ] IS Class

Returns TRUE if an object is an instance of a class, or one of its descendants.

If NOT is specified, the test is inverted.

  • Expression is any expression that returns an object reference.

  • Class is a class name.

Examples

PRINT ["Gambas", "rules!"] IS String[]
True

DIM myTextBox AS NEW TextBox(ME)

PRINT myTextBox IS Control
True

PRINT ["Gambas", "rules!"] IS Collection
False

Examples

PRINT ["Gambas", "rules!"] Not Is Collection
True

See also