Types

Top  Previous  Next

Undefined

The Undefined type has just one value, called undefined. Variables are initialized to the value undefined.

 

Null

The Null type has just one value, called null.

 

Boolean

The Boolean type has two values, true and false.

 

Number

The Number type can represent integer and floating-point values. It can also have the special value NaN, for “Not-a-Number”, and the special values +Infinity and ‑Infinity.

 

Any value of the Number type is also a Number Object, which has methods and properties which operate on the number.

 

Internally, numbers can be represented by either 32-bit integers or in 32-bit IEEE floating-point format. Some operators convert their operands to integer (e.g., logical operators), some convert to floating-point (e.g., division), and some accept either format. A two-operand operator that accepts both formats and is given operands in two different formats will convert the integer to floating-point.

 

String

The String type contains sequences of zero or more 8-bit characters. Once created, a string cannot be changed; to modify a string, a new string with the modified value is created.

 

Any value of the String type is also a String Object, which has methods and properties which operate on the string.

 

Object

CellScript has a specific set of objects; see Language Objects. The Cell also adds hardware-specific objects; see the Cell documentation for details.