Integer Representation
Matchbox 0.2 represents values as signed 32-bit integers:
var positive int = 42
var negative int = -42
var zero int = 0
Width and Range
The int range is -2,147,483,648 through 2,147,483,647.
Arithmetic is implemented with the host C runtime. Matchbox does not check for overflow, and overflowing signed arithmetic is not defined by the language. Programs should not depend on wraparound.
Division by zero, invalid shift counts, and negating or taking abs of the minimum integer are also outside the defined behavior of this release.
Bytecode Encoding
The virtual machine uses 8-bit and 16-bit fields for some instruction operands. These fields encode parts of an instruction and do not reduce the 32-bit width of values stored by the runtime.
The names byte, word, and related terms describe fixed quantities of bits; they do not define additional Matchbox types. See Storage Units.
The byteorder function reports the runtime system's byte order.