blob: a537f82f81aba3c89c2448f01f755e2b1f735deb [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstrad59c3892019-11-28 20:53:39 +01002 mixed * unmkmapping(mapping map)
MG Mud User88f12472016-06-24 23:31:02 +02003
Zesstra715ec202025-07-09 22:18:31 +02004DESCRIPTION
5 Take mapping <map> and return an array of arrays with the keys
6 and values from the mapping.
MG Mud User88f12472016-06-24 23:31:02 +02007
Zesstra715ec202025-07-09 22:18:31 +02008 The return array has the form ({ keys[], data0[], data1[], ... }),
9 with keys[] being the array of all keys, data0[] the array of
10 all values in the first column, data1[] the array of all values
11 in the second column, etc. In particular, the data for key[x]
12 is stored in data0[x], data1[x], etc.
MG Mud User88f12472016-06-24 23:31:02 +020013
Zesstra715ec202025-07-09 22:18:31 +020014 unmkmapping() is inverse to mkmapping(), so that
MG Mud User88f12472016-06-24 23:31:02 +020015
16 apply(#'mkmapping, unmkmapping(m)) == m
17
Zesstra715ec202025-07-09 22:18:31 +020018 holds.
19
20EXAMPLES
MG Mud User88f12472016-06-24 23:31:02 +020021 mapping m = ([ 1:10;20, 2:11;21 ]);
Zesstra715ec202025-07-09 22:18:31 +020022 unmkmapping(m)
23 --> returns ({ ({1, 2}), ({ 10, 11 }), ({ 20, 21 }) })
MG Mud User88f12472016-06-24 23:31:02 +020024
Zesstra715ec202025-07-09 22:18:31 +020025HISTORY
26 Introduced in LDMud 3.2.6.
MG Mud User88f12472016-06-24 23:31:02 +020027
Zesstra715ec202025-07-09 22:18:31 +020028SEE ALSO
29 mappings(LPC), mappingp(E), m_indices(E), m_values(E),
30 m_delete(E), sizeof(E), widthof(E).