Class Statement

The class statement declares a new class, which inherits from other classes.

This page discusses:

See Also
Package Statement

Syntax



A type reference has the following syntax:



Use

The package reference is optional for types in the current package and for types in the core OTScript package.

Examples

PACKAGE PackageA;               // Opens package PackageA
CLASS ClassA : Entity_;         // Declares ClassA which inherits from Entity_ core type
PACKAGE PackageB;               // Opens package PackageB
CLASS ClassB : PackageA.ClassA; // Declares ClassB which inherits from ClassA in PackageA
CLASS PackageA.ClassC : ClassB; // Declares ClassC in PackageA which inherits from ClassB