The COMPLEX.CMD sample in the \TOOLKIT\SAMPLES\REXX directory demonstrates how to create a complex number class using the ::class and ::method directives. Also shown is an example of subclassing the complex number class (the vector subclass). Finally, the stringlike class demonstrates the use of a mixin to provide some string behavior to the complex number class.
The USECOMP.CMD sample in the \TOOLKIT\SAMPLES\REXX directory demonstrates the use of the ::requires directive to use the complex number class defined in COMPLEX.CMD.
For this sample to function properly, Object REXX must be installed.