values

skylib_fluffos_v3/mudlib/doc/driver/efuns/mappings/values · 711 B

From the archive skylib_fluffos_v3.zip

Download the archive   « Back to the archive contents

.\"return an array of the values from the (key, value) pairs in a mapping
.DT
values
$MUDNAME$ driver help
values

.SH Name
.SI 5
values() - return an array of the values from the (key, value) pairs
           in a mapping
.EI

.SH Synopsis
.SI 5
mixed *values( mapping m );
mixed *m_values( mapping m );
.EI

.SH Description
.SP 5 5
values() returns an array of values corresponding to the value elements
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

values( m ) == ({ 35, 42, 100 })
.EI

.SP 5 5
Note: the values will be returned in the same order as the corresponding
keys.
.EP

.SH See also
.SI 5
keys()
.EI

Site Stats

Snippets: 1791
Codebases: 571