Method types()


Method types

array(type) types(string|array|mapping|multiset|object|program x)

Description

Return an array with the types of all valid indices for the value x.

Parameter x
string

For strings this is simply an array with int

array

For arrays, mappings and multisets this is simply an array with mixed.

mapping
multiset
object

For objects which define lfun::_types() that return value is used.

For other objects an array with the types for all non-protected symbols is returned.

program

For programs an array with the types of all non-protected constant identifiers (but not methods or variables) is returned.

Note

This function was added in Pike 7.9.

See also

indices(), values(), lfun::_types()