.\"return an array of the keys from the (key, value) pairs in a mapping
.DT
keys
$MUDNAME$ driver help
keys
.SH Name
.SI 5
keys() - return an array of the keys from the (key, value) pairs
in a mapping
.EI
.SH Synopsis
.SI 5
mixed *keys( mapping m );
mixed *m_indices( mapping m );
.EI
.SH Description
.SP 5 5
keys() returns an array of keys (indices) corresponding to the keys in
the (key, value) pairs stored in the mapping m.
For example, if:
.EP
.SI 5
mapping m;
m = ([ "hp" : 35, "sp" : 42, "mass" : 100 ]);
then
keys(m) == ({"hp", "sp", "mass"})
.EI
.SP 5 5
Note: the keys will not be returned in any apparent order. However, they
will be returned in the same order as the corresponding values (returned
by the values() efun).
This efun is also available under the name m_indices().
.EP
.SH See also
.SI 5
values()
.EI