1  Introduction

IvoryScript is the programming language for the Ivory System. At the outermost level, its syntax defines two kinds of scripts:

  1. Built-in modules;
  2. Orders

Apart from outer level differences, the two kinds share the same expression syntax.

1.1  Modules

A module comprises a collection of related declarations and definitions. Some of the names are visible to other modules and orders.

1.2  Orders

An order is a sequence of expressions intended for direct evaluation.

1.4  Data Types

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.

1.4.1  Primitive Data Types

The primitive data types are:

1.4.1.1  *

The type * is the superset of all evaluated value types.

1.4.1.2  Void

An expression denoting no value has type Void. There are no values of type Void and the type has no constructors.

1.4.1.3  Name

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.

1.4.1.4  Type

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.

1.4.1.5  Int

Integers are represented by the Int data type. The range is implementation dependent, but a minimum representation of 32 bits is expected.

1.4.1.6  Float and Double

Floating point numbers are represented by the data types Float and Double. They correspond, respectively to the C/C++ float and double types.

1.4.1.7  Char

Characters are represented by the Char data type. The character code is implementation dependent.

1.4.1.8  String

Strings of characters are represented by the String data type.

1.4.1.9  Ref

Object references are represented by the Ref data type.

1.4.2  Function or Arrow Types

Function types denote a mapping from one type to another and take the form:

<type1> -> <type2>

1.4.3  Parameterised Types

Unevaluated expressions have a parameterised type:

Exp t

Where t is the type of the value denoted by the expression.


home

Last update: 11 October, 2005