Values

There are two main kinds of values in Toy Basic - numeric and string - plus a special null value used to represent an unassigned value.

Numeric values

Numeric values are plain numbers. Examples:

  • Integer numbers, e.g. 0 or 10
  • Decimal numbers, e.g. 0.9 or 10.001
  • Negative numbers, e.g. -10 or -100.01

String values

String values are sequences of characters enclosed in double quotes. Examples:

  • "Hello World"
  • "0.5"
  • "http://www.toybasic.org"

Null

Toy Basic also has a special null value. Null indicates that a variable or member does not contain a value. You commonly check for or assign null when working with variables and members.

See also: