Class File

With classes you can make several kinds of non-procedural declarations. The first line in a class declares the name of the class and an optional structure or enumerated type declaration.


Subsequently you can make additional Type declarations.


Classes can also contain Global variable declarations. By default Globals can be modified only by methods that are members of the class. They can still be read by any other method. You can permit both read and write access from any method by coding a lead plus sign.


A class can also be designated to be private. Globals in these classes can only be be accessed by procedures in the private class or from neighboring classes. A neighboring class file is in the same directory as the private class or in the directory above it.

To gain access to a Global from a procedure include a Use or Alter declaration in the procedure. A Use declaration is for read-only access and Alter allows write access as well. Classes can also have Use declarations to gain read access read Globals declared in other class.


By default, when a method belongs to a class it gains implicit access to any globals declared in the class; no Use declaration is needed. Any Use or Alter declaration for a Global with the same name will override this default.

Additional facilities in classes allow for inheritence, virtual procedures, and generic templates. When a class is inherited its primary structure or enumeration is merged into the class doing the inheriting. Its member methods are also merged in.

Generic templates allow classes to be parameterized at compile time. Most commonly Generics allow the same method to operate on multiple types.

Precondition and Postcondition

Build a Program