Example String methodsOf 003
|
A Dictionary object type is made up of bindings (key, value)
similar to structures. If a dictionary is accessed by 2
index references, the first index retrieves the I-th binding.
The second index (=0) will retrieve the binding's name and the
index (=1) will retrieve the binding's value. In this example, the binding's value, which is the Lambda
associated with the method is retrieved. This line of code gets the number of methods defined in the
String Methods Dictionary.
Returns:
(writeln "Lambda #" n " is " (ref (methodsOf String:) n 1)))
Returns:
Lambda #1 is #<Lambda 47715>
Lambda #2 is #<Lambda 47721>
Lambda #3 is #<Lambda 47726>
Lambda #4 is #<Lambda 47731>
Lambda #5 is #<Lambda 47735>
Lambda #6 is #<Lambda 47740>
Lambda #7 is #<Lambda 47744>
Lambda #8 is #<Lambda 47749>
Here are examples of the methodsOf 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.
defmethod(#void) | send(#void) | addMethod(#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.
String
Text
Dictionary
Analytic Information Server (AIS)AIS Component Systems
|