Function method
method className methodName argList body
Adds a method to a previously created class.
- Parameters:
- className -
Symbol identifying the class the method is being added to.
- argList -
List of symbols representing the formal arguments of the method,
or a symbol representing the list of formal arguments.
- body -
Code block that will be used as the body of the method.
-
The method named constructor has a special meaning.
Whenever a new instance of className is created by
a call to the new function
the constructor method is automatically called. At the
time of invocation it will receive as arguments the same arguments that
were passed to the new function.
It is responsability of the constructor method to call
the constructor of the super class, if the class className
has one.
Report a bug or request new features
© 2002