Example String methodsOf 002
|
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 name, which is the message name
associated with the method is retrieved. This line of code gets the number of methods defined in the
String Methods Dictionary. The binding's name is retrieved through the second index (=0)
in the ref function. Then the the Method names for the String type: are displayed.
Returns:
(writeln "Message #" n " is " (ref (methodsOf String:) n 0)))
Returns:
Message #0 is Eat
Message #1 is charAt
Message #2 is indexOf
Message #3 is lastIndexOf
Message #4 is length
Message #5 is split
Message #6 is substring
Message #7 is toLowerCase
Message #8 is toUpperCase
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
|