A class is created in a manner similar to a structure, using the DEFINE command.
A simple class declaration has the form:
DEFINE CLASS new_class_name field1_type field1_name field2_type field2_name ... ENDDEFINE
For example, the following declaration creates a class called Circle:
DEFINE CLASS Circle double CenterX double CenterY double Radius double Area ENDDEFINE
Once the class has been declared, objects of the class can be declared using the LOCAL and GLOBAL commands. This has the general form:
local class_name obj_name
Example:
local Circle c c.CenterX = 5 c.CenterY = 3 c.Radius = 2 c.Area = 12.57
The declaration of class methods is separate from the class declaration and is described in Member functions.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.