Finding Functions by Name
There are a number of ways to get a function by name, but it depends on where the function is located. The following is an incomplete list of techniques.
~~Based on a posting to the Pike mailing list by Grubba~~
- Visible in any object:
{code}
obj[fun]
{code}
- Visible in the current object:
{code}
this_object()[fun]
{code}
~~or~~
{code}
this[fun]
{code}
~~or~~
{code}
::`[](fun, 2)
{code}
- Visible in some lexically scoped object:
{code}
scope::this[fun]
{code}
- In the current object including private and protected:
{code}
::`[](fun, 3)
{code}
- Visible in the current program:
{code}
this_program::this[fun]
{code}
~~or~~
{code}
::`[](fun)
{code}
- In the current program (including private and protected):
{code}
::`[](fun, 1)
{code}
- efun:
{code}
all_constants[fun]
{code}
- Module function:
{code}
master()->resolv(fun)
{code}
__See Also__
[IndexingOverview]Powered by PikeWiki2 |
|||
| gotpike.org | Copyright © 2004 - 2009 | Pike is a trademark of Department of Computer and Information Science, Linköping University | |||