capri, a script language

Home | Documentation | Releases | Sources | Contact

Value types

Types are dynamically assigned to variables; you can not specify a type for a variable. Any variable can contain one of the following types of value:

Type checking

To check if an object is of one of the types, use the typecheck expression. This expression looks returns either true or false. On the left-hand-side there can be any expression, on the right-hand-side one of the above types.

something = object();
if(something is object) {
	IO.println("It's an object!");