MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | 01c0287 | 2019-03-01 21:51:21 +0100 | [diff] [blame] | 2 | int sizeof(mixed * val) |
| 3 | int sizeof(string val) |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 4 | int sizeof(bytes val) |
Zesstra | 01c0287 | 2019-03-01 21:51:21 +0100 | [diff] [blame] | 5 | int sizeof(mapping val) |
| 6 | int sizeof(struct xxx val) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 7 | |
| 8 | BESCHREIBUNG |
| 9 | Liefert die Anzahl Elemente in einem Array <val>, die Anzahl |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 10 | Zeichen in einem String <val>, die Anzahl an Bytes in der |
| 11 | Bytefolge <val> oder die Anzal Keys in einem Mapping <val>. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 12 | |
| 13 | Als Spezialfall kann <val> auch 0 sein. In diesem Fall liefert die |
| 14 | Funktion 0 zurueck. |
| 15 | |
Zesstra | 01c0287 | 2019-03-01 21:51:21 +0100 | [diff] [blame] | 16 | Falls im Spiel Objekte zerstoert wurde, seit das Mapping zuletzt auf |
| 17 | zerstoerte Keys geprueft wurde, muss es zuerst auf zerstoerte Objekte |
| 18 | in Keys geprueft werden. In diesem Fall steigt die Laufzeit mit der |
| 19 | Anzahl der Keys im Mapping (O(n)). |
| 20 | Anderenfalls ist die Laufzeit unabhaengig der Anzahl der Schluessel |
| 21 | (O(1)). |
| 22 | |
| 23 | GESCHICHTE |
| 24 | LDMud 3.2.9 fuehrte Strings als moegliche Argumente ein. |
| 25 | LDMud 3.3 fuehrte Structs als moegliche Argumente ein. |
| 26 | |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 27 | SIEHE AUCH |
Zesstra | 01c0287 | 2019-03-01 21:51:21 +0100 | [diff] [blame] | 28 | strlen(E), allocate(E), pointerp(E), mappingp(E), m_allocate(E), |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 29 | widthof(E) |