next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language

The Macaulay2 language

The Macaulay2 language is a simple yet powerful interpreted language. Every object has a type, such as Type, ZZ (integer), String, HashTable, Ring, Matrix, Function, etc. User defined variables may hold values of any type.

Expressions in Macaulay2 include function calls, control structures (e.g., for and while loops), function definitions, and operator expressions. Every expression returns an object, although null is often returned if the expression is being used only to produce some side effect.

There is special syntax for creating and accessing strings, lists, sequences, and hashtables. These are the key data types underlying many new types. The Macaulay2 engine implements rings, ring elements, and matrices, as instances of low-level types, and various high-level types, visible to the user, are based on them. Examples include Ring, RingElement, Matrix, Ideal, RingMap, Module, and ChainComplex.

The user can create new types of higher level mathematical objects, whose types form a hierarchy that facilitates the installation and use of appropriate methods for computing with them.

Menu

basic data types

expressions

functions

classes and types

input and output

packages

system facilities

debugging