Zesstra | cbd5f9b | 2020-08-11 21:08:39 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | unknown call_strict(object|string ob, string func, ...) |
| 3 | unknown call_strict(object*|string* ob, string func, ...) |
| 4 | |
| 5 | ob.fun(...) |
| 6 | ob->"fun"(...) |
| 7 | ob->(fun)(...) |
| 8 | |
| 9 | DESCRIPTION |
| 10 | Similar to call_other(). Call a member function <fun> in another |
| 11 | object <ob> if the function is defined and publicly accessible. |
| 12 | Any of the optional extra arguments are passed to the function. |
| 13 | Result is the value returned from the called function. |
| 14 | |
| 15 | ob.fun(args) and ob."fun"(args) are equivalent to |
| 16 | call_strict(ob, "fun", args). |
| 17 | "ob_name".fun(args) and "ob_name"."fun"(args) are equivalent to |
| 18 | call_strict("ob_name", "fun", args); |
| 19 | ob.(fun)(args) is equivalent to call_strict(ob, fun, args), |
| 20 | "ob_name".(fun)(args) is equivalent to |
| 21 | call_strict("ob_name", fun, args). |
| 22 | |
| 23 | If ob::fun does not define a publicly accessible function, the |
| 24 | efun will call the H_DEFAULT_METHOD hook if set. If the hook |
| 25 | is not set or can't resolve the call either, the efun will raise |
| 26 | a runtime error. |
| 27 | |
| 28 | Calls to the master object never use the H_DEFAULT_METHOD hook. |
| 29 | To force non-default calls, the efun call_direct_strict() can |
| 30 | be used. |
| 31 | |
| 32 | ob can also be an object_name. If a string is passed for ob |
| 33 | and an object with that name can't be found or loaded, an |
| 34 | error occurs. |
| 35 | |
| 36 | Additionally the efun accepts an array of objects as <ob>: the |
| 37 | function is called with the same arguments in all the given objects. |
| 38 | The single results are collected in an array and yield the final |
| 39 | result. Array elements can be objects or the names of existing |
| 40 | objects. If a call to any of the objects failes, the efun will |
| 41 | raise a runtime error. |
| 42 | |
| 43 | HISTORY |
| 44 | Introduced in LDMud 3.6.2. |
| 45 | |
| 46 | SEE ALSO |
| 47 | call_other(E), call_resolved(E), call_direct(E), |
| 48 | call_direct_strict(E), call_direct_resolved(E), |
| 49 | create(A), pragma(LPC), extern_call(E), function_exists(E), |
| 50 | functions(LPC), map_objects(E) |