IvoryScript is the programming language for the Ivory System. At the outermost level, its syntax defines two kinds of scripts:
Apart from outer level differences, the two kinds share the same expression syntax.
A module comprises a collection of related declarations and definitions. Some of the names are visible to other modules and orders.
An order is a sequence of expressions intended for direct evaluation.
Names and literal constants are associated with values as well as expressions denoting values. In common with other languages, data types distinguish particular sets of values.
The primitive data types are:
The type * is the superset of all evaluated value types.
An expression denoting no value has type Void. There are no values of
type Void and the type has no constructors.
The purpose of the Name data type is to support both space and time efficient late name binding.
Values of type Name are used to represent identifiers.
Names are typically implemented as short integers and most name comparisons can be carried out with a simple integer comparison.
The Type data type represents a type as a value for dynamic programming.
Types are typically also implemented as short integers and most type comparisons can be carried out with a simple integer comparison.
Integers are represented by the Int data type. The range is implementation
dependent, but a minimum representation of 32 bits is expected.
Floating point numbers are represented by the data types Float and Double.
They correspond, respectively to the C/C++ float and double types.
Characters are represented by the Char data type. The character code is implementation dependent.
Strings of characters are represented by the String data type.
Object references are represented by the Ref data type.
Function types denote a mapping from one type to another and take the form:
<type1> -> <type2>
Unevaluated expressions have a parameterised type:
Exp t
Where t is the type of the value denoted by the expression.
Last update: 11 October, 2005