GetRef: Difference between revisions
Jump to navigation
Jump to search
→Description: fix word spelling |
|||
| Line 12: | Line 12: | ||
End Function | End Function | ||
A=printTxt("Call function directly") | A = printTxt("Call function directly") | ||
B=GetRef(printTxt) | B = GetRef(printTxt) | ||
B("Call function indirectly") | B("Call function indirectly") | ||
</pre> | </pre> | ||
Revision as of 20:36, 25 April 2015
GetRef (objectName)
Description
GetRef returns a reference to an object. This can be useful when you want get the reference to a function instead of calling it.
Example
Function printTxt(txt)
Print txt
End Function
A = printTxt("Call function directly")
B = GetRef(printTxt)
B("Call function indirectly")
Output
Call function directly. Call function indirectly.