| TinTin++ Mud Client Manual |
|
TinTin++ Escape Codes Foreach Format Function Gag Grep Help Highlight History If Ignore Info Keypad Kill Line List Log Loop Macro Map Math Mathexp Message Name Nop Parse Path Pathdir Prompt Read |
|
|
| List |
| Syntax: #list {variable} {del|ins|get|set|len} {argument} |
#list {list} {clr} Empty the given list
#list {list} {del} {index} Delete an item from the list
#list {list} {fnd} {string} {variable} Return index if {string} is found.
#list {list} {get} {index} {variable} Copy an item to {variable}
#list {list} {ins} {index} {string} Insert {string} at given index
#list {list} {len} {variable} Copy list length to {variable}
#list {list} {set} {index} {string} Change an item at the given index
#list {list} {srt} {string} Insert item in alphabetic order
|
| The index should be between 1 and the list's length. You can also give a negative value, in which case -1 equals the last item in the list, -2 the second last, etc. |
| When inserting an item a positive index will append the item at the given index, while a negative index will prepend the item. |
| A length of 0 is returned for an empty or non existant list. |
| Notice: You can directly access elements in a list variable using $var[1], $var[2], $var[-1], etc. |