.. efun:: mixed * variable_list(object ob, int flags) :include: Return an array with information about :arg:`ob's ` variables. For every variable, 1 to 3 values (depending on :arg:`flags`) are stored in the result array conveying in this order: - the name of the variable - the variable flags (see below) - the return type (listed in ) - the value of the variable :arg:`ob` may be given as true object or as a filename. In the latter case, the efun does not try to load the object before proceeding. If :arg:`ob` is not the current object and the value of the variable is requested, a privilege_violation ("variable_list", ) occurs. .. todo:: privilege violation :arg:`flags` determines both which information is returned for every variable, and which variables should be considered at all. Its value is created by bin-or'ing together the following flags from : Control of returned information: :macro:`RETURN_FUNCTION_NAME` include the variable name :macro:`RETURN_FUNCTION_FLAGS` include the variable flags :macro:`RETURN_FUNCTION_TYPE` include the return type :macro:`RETURN_VARIABLE_VALUE` include the variable value Control of listed variables: :macro:`NAME_INHERITED` don't list if defined by inheritance :macro:`TYPE_MOD_STATIC` == :macro:`TYPE_MOD_NOSAVE` don't list if nosave ('static') variable :macro:`TYPE_MOD_PRIVATE` don't list if private :macro:`TYPE_MOD_PROTECTED` don't list if protected :macro:`NAME_HIDDEN` don't list if not visible through inheritance The 'flags' information consists of the bin-or of the list control flags given above, plus the following: :macro:`TYPE_MOD_VIRTUAL` variable is inherited virtually :macro:`TYPE_MOD_NO_MASK` variable is nomask :macro:`TYPE_MOD_PUBLIC` variable is public All these flags are defined in ; the return types are defined in . :history 3.2.10 introduced: .. seealso:: :efun:`inherit_list`, :efun:`functionlist`, :efun:`variable_exists`