Send an unknown method call: Difference between revisions

m (→‎{{header|Scala}}: Rm Scala imp category)
Line 305:
}</lang>
The <code>performSelector: ...</code> methods can only be used with methods with 0 - 2 object arguments, and an object or <code>void</code> return type. For all other calls, one can create an <code>NSInvocation</code> object and invoke it, or directly call one of the <code>objc_msgSend</code> family of runtime functions.
 
=={{header|Oforth}}==
 
A method object can be retrieved from its name using asMethod.
<lang Oforth>16 "sqrt" asMethod perform</lang>
Others :
asFuntion : retrieve a function
asClass : retrieve a class
asProperty : retrieve a property
 
A generic way to search a word into the dictionary in to use find method :
<lang Oforth>16 Word find("sqrt") perform</lang>
 
=={{header|PARI/GP}}==
1,015

edits