blob: d940c41d4a50105364bcf348783705312e50e7b6 [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <functionlist.h>
3
Zesstra715ec202025-07-09 22:18:31 +02004 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 User88f12472016-06-24 23:31:02 +02008
Zesstra715ec202025-07-09 22:18:31 +02009DESCRIPTION
10 Look up a variable <str> in the current object, respectively
11 in the object <ob>.
MG Mud User88f12472016-06-24 23:31:02 +020012
Zesstra715ec202025-07-09 22:18:31 +020013 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 User88f12472016-06-24 23:31:02 +020017
Zesstra715ec202025-07-09 22:18:31 +020018 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 User88f12472016-06-24 23:31:02 +020021
Zesstra715ec202025-07-09 22:18:31 +020022 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 User88f12472016-06-24 23:31:02 +020024
Zesstra715ec202025-07-09 22:18:31 +020025HISTORY
26 Introduced in LDMud 3.2.10.
MG Mud User88f12472016-06-24 23:31:02 +020027
Zesstra715ec202025-07-09 22:18:31 +020028SEE ALSO
MG Mud User88f12472016-06-24 23:31:02 +020029 function_exists(E), variable_list(E)