![]() |
Example Function send 014
|
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.
Notes and Hints Dissecting the send command involves understanding the methods dictionary
of any Analytic Information Server type. In general the send command is translated
as a reference into the methods dictionary: ((ref (methodsOf (type object)) msgName object args .. )) The statement : (send eval: add1 96.1 ) is translated into ((ref (methodsOf (type add1 )) eval:) add1 96.1) Each statement segment results in:
Returns:
Returns:
Returns:
(type add1)
Returns: Function (methodsOf (Function:))
Returns: #<Dictionary 123456> (ref (methodsOf (type add1 )) eval:)
Returns: #<Lambda 123456> ((ref (methodsOf (type add1 )) eval:) add1 96.1)
January
Here are examples of the send function at work.
Here is the link to the current function used in this example.
Here are a number of links to other related functions.
addMethod(#void) | defmethod(#void) | methodsOf(#void) |
Here are the links to the data types of the arguments used in this example. Here are a number of links to examples having similar argument types.
Symbol
Dictionary
![]() |
Analytic Information Server (AIS)AIS Component Systems
|