|
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 Boolean: msgName(args...) faces: (vars...) vars: (vars...)
The Methods Dictionary for the Boolean data type.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
This example defines a method and a message named toEnglish
that converts the Boolean Value, true, to the English word "Yes" and
converts the Boolean value, false, to the English word "No".
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 Boolean: Mandatory keyword. Tells defmethod to add the following Lambda to
the Boolean type. --- msgName(args...) The name of the message to which the Boolean 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?