Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 1 | SYNOPSIS |
| 2 | mixed * m_values(mapping map) |
| 3 | mixed * m_values(mapping map, int index) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 4 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 5 | DESCRIPTION |
| 6 | Returns an array with the values of mapping 'map'. |
| 7 | If <index> is given as a number between 0 and the width of |
| 8 | the mapping, the values from the given column are returned, |
| 9 | else the values of the first column. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 10 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 11 | EXAMPLES |
| 12 | mapping m = ([ "foo":1;2;3, "bar":4;5;6, "baz":7;8;9 ]) |
| 13 | m_values(m) --> returns ({ 1, 4, 7 }) or some permutation thereof |
| 14 | m_values(m, 0) --> returns ({ 1, 4, 7 }) (ditto) |
| 15 | m_values(m, 1) --> returns ({ 2, 8, 9 }) (ditto) |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 16 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 17 | Note that exact order of the values in the resulting arrays is not |
| 18 | specified, and may vary after any change to the mapping. The only |
| 19 | guarantee given is that if m_indices() and m_values() are taken at the |
| 20 | same time, the order of both results is identical. |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 21 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 22 | SEE ALSO |
| 23 | mappingp(E), mkmapping(E), m_indices(E), m_add(E), m_delete(E), |
| 24 | sizeof(E), widthof(E), unmkmapping(E). |