MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | #include <functionlist.h> |
| 3 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 4 | string variable_exists(string str) |
| 5 | string variable_exists(string str, int flags) |
| 6 | string variable_exists(string str, object|lwobject ob) |
| 7 | string variable_exists(string str, object|lwobject ob, int flags) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 8 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 9 | DESCRIPTION |
| 10 | Look up a variable <str> in the current object, respectively |
| 11 | in the object <ob>. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 12 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 13 | The result is the name of the program the variable is defined |
| 14 | in. This can be either object_name(ob), or the name of an |
| 15 | inherited program. If !compat mode, the returned name always |
| 16 | begins with a '/'. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 17 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 18 | If <flags> can be passed as NAME_HIDDEN to return information |
| 19 | about static and protected variables in other objects. It is |
| 20 | not possible to return information about private variables. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 21 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 22 | If the variable cannot be found (because it doesn't exist or |
| 23 | it is not visible to the caller), the result is 0. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 24 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 25 | HISTORY |
| 26 | Introduced in LDMud 3.2.10. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 27 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 28 | SEE ALSO |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 29 | function_exists(E), variable_list(E) |