Basic type checking

Every Gosu object and value has a type. For example, the type of an instance of a class is the class itself.

Gosu provides the following operators to retrieve or test an item’s type.

  • The typeof operator retrieves the run-time type of an item.
  • The typeis operator tests the type of an item.