Read Me - Common Public License V1.0 - Copyright Notice(©)



Incorporates the method object [method] in the receiver class's collection of instance methods. The method name [methodname] is translated to to uppercase. Using the [define] method replaces any existing definition for [methodname] in the receiver class.

If you omit [method] , the method name [methodname] is made unavailable for the receiver class. Sending a message of that name to an instance of the class causes the [unknown] method (if any) to be run.

The [method] argument can be a string containing a method source line instead of a method object. Alternatively, you can pass an array of strings containing individual method lines. Either way, [define] creates an equivalent method object.


  1. The classes Rexx provides do not permit changes or additions to their method definitions.
  2. The define method is a protected method.

Class class - define method

bank_account~define("TYPE",'return "a bank account"')

Read Me - Common Public License V1.0 - Copyright Notice(©)