|
defmethod
|
The defmethod macro constructs an Lambda {exp} with an arbitrary number
of arguments {args...}, the Lambda's published interfaces {faces:},
local variables {vars: }, persistent variables {pvars:} and persistent
class variables {cvars:}. The new Lambda is added to the Methods Dictionary of
the specified type {type}. After adding the Lambda to the Methods Dictionary of
the {type}, the type will respond to the message named {msgName}.
This feature is instrumental in providing Analytic Information Server with support for
standard Object Oriented Programming features. The Analytic Information Server Lisp compiler constructs a method binding from the
{msgName} argument and the Lambda.
The new method binding is installed
in the methods Dictionary associated with the
specified type {type}.
The defmethod function returns the Methods Dictionary object. When to use The defmethod macro is used to install a method in the Methods Dictionary
for a type. The defmethod is a macro version of the addMethod function.
Methods Dictionary
MsgName1 LambdaName1 MsgName2 LambdaName2 MsgName3 LambdaName3
(defmethod Function: msgName(args...) faces: (vars...) vars: (vars...)
The Methods Dictionary for the Function data type.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_Function_defmethod_016
This example defines a method named evalFun that is invoked when the Function
type receives a eval message. The evalFun method takes function with a single parameter,
coerces the parameter to an integer and returns the result after evaluating the function.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
pvars: (vars...) cvars: (vars...)( exp ) )
Name
Description
AIS Types Function: Mandatory keyword. Tells defmethod to add the following Lambda to
the Date type. --- msgName(args...) The name of the message to which the Function type will respond
and the argument list required by the Lambda --- faces: (var...) Optional Argument. If present, must be followed by a interfaces feature list --- vars: (var...) Optional Argument. If present, must be followed by a by a local variable list --- pvars: (var...) Optional Argument. If present, must be followed by a by a persistent variable list cvars: (var...) Optional Argument. If present, must be followed by a by a persistent class variable list --- exp... The Lisp statements that form the Lambda ---
Returns:
Examples
Argument Types
Symbol
Dictionary
How do I contact the AIS team?