Testasd » History » Version 52
Per Amundsen, 02/07/2023 11:37 AM
1 | 45 | Per Amundsen | h1. Multidimensional arrays |
---|---|---|---|
2 | |||
3 | 52 | Per Amundsen | */marray -a <name> <type> <key/label/item> <value>* |
4 | 45 | Per Amundsen | |
5 | add item |
||
6 | |||
7 | 52 | Per Amundsen | */marray -e <name> <N> <type> <key/label/item> <value>* |
8 | 45 | Per Amundsen | |
9 | edit item |
||
10 | |||
11 | */marray -d <name> <N>* |
||
12 | |||
13 | delete item |
||
14 | |||
15 | */marray -f <name>* |
||
16 | |||
17 | delete/free table |
||
18 | |||
19 | 46 | Per Amundsen | *$marray(name, N, [N..])* |
20 | 45 | Per Amundsen | |
21 | 50 | Per Amundsen | gets the Nth item in a table, subsequent N parameters gets the Nth item from a sub table, infinite sub depth. |
22 | 45 | Per Amundsen | |
23 | *Switches* |
||
24 | |||
25 | 52 | Per Amundsen | .key - Get item key/label/item. |
26 | 45 | Per Amundsen | .value - Get item value. |
27 | 49 | Per Amundsen | .type - Get item type. (0 = text, 1 = number, 2 = bool, 3 = bvar, 4 = sub table) |
28 | 51 | Per Amundsen | .json - TODO, generate a json table from all items in the table and all sub tables' |
29 | .ini - ? |