Contents | Prev | Next | Index


The Module SYSTEM

The purpose of the module SYSTEM is to provide certain low-level types and procedures as needed for a given computer and operating system.

It is strongly recommended to restrict the use of the module SYSTEM to specific low-level modules, because such modules are inherently non-portable und unsafe. They are easily recognized due to the identifier SYSTEM appearing in their import list.

The following specifications hold for the implementation of Oberon-2 on the Java Virtual Machine.

Module SYSTEM exports a type BYTE with the following characteristics: Variables of type SHORTINT or BOOLEAN can be assigned to variables of type BYTE. Notice that, unlike other Oberon-2 implementations, it is not possible to assign variables of type CHAR to variables of type BYTE, because in this Oberon-2 implementation CHAR is 2 bytes wide because of the UNICODE support. If a formal variable parameter is of type ARRAY OF BYTE, then the corresponding actual parameter may be of any type.

Another type exported by module SYSTEM is the type PTR. Variables of any pointer type may be assigned to variables of type PTR. This compiler translates PTR into the java.lang.Object type. If a formal variable parameter is of type PTR, the corresponding actual parameter may be any pointer type.

In the following descriptions of the SYSTEM procedures, v stands for a variable, x, y, a, and n for expressions, and T for a type. Most of these procedures correspond to simple Java instructions compiled as inline code.

SYSTEM Function Procedures

SYSTEM Proper Procedures

SYSTEM Exception Handling


Contents | Prev | Next | Index

Canterbury Oberon-2 for Java  (Last documentation update Feb 8, 2000)
Copyright © 1998 Mill Hill & Canterbury Corporation, Ltd. All rights reserved
Please send any comments or corrections to mhc@webcom.com