U()
Jump to navigation
Jump to search
The u function evaluates an attribute, either from the object performing the function or from another object you own, passing in arguments and returning the result.
When evaluating the fetched attribute, %# refers to the original enactor and not the 'calling' object, and 'me' refers to the object that supplied the attribute.
Examples
> @va me=Word is [extract(v(vb),add(%0,1),1)], arg2 is %1.
> @vb me=This is a test of the u function.
> say u(va,4,Testing 123)
You say "Word is of, arg2 is Testing 123."
> say u(va,7)
You say "Word is function., arg2 is ."
> say u(me/va,6,Foobar)
You say "Word is u, arg2 is Foobar."
Related Topics
s(), v(), get(), get_eval(), map(), ulocal(), extract(), add(), Substitutions.