[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

25.1.1 Class Overview

A class is the primary organizing concept of FreeM support for object-oriented programming, and in FreeM, is simply an M routine with a few special properties:

MYCLASS(THIS,INIT):OBJECT ; Constructor for MYCLASS, inherits OBJECT
  ; two private variables
  S THIS("NUMERATOR"):PRIVATE=$P(INIT,"/",1)
  S THIS("DENOMINATOR"):PRIVATE=$P(INIT,"/",2)
  Q
  ;
DESTROY(THIS) ; This is the destructor
  Q

The above example demonstrates general class syntax.


This document was generated on May 5, 2025 using texi2html 5.0.