-
-
Notifications
You must be signed in to change notification settings - Fork 46
Lists
Generated on 9/2/2024 10:46:49 PM
Version: 4.425.19+0c26057dbb7e7e285dbbb7378d1639f9d9112e29
Method Signature:
Void ClearList(System.String)
- listname: List name.
Description:
Clear a list by name.
Example:
ClearList("list")
Method Signature:
Void CreateList(System.String)
- listname: List name.
Description:
Create list with given name, if list already exists, it is overwritten.
Example:
CreateList("list")
Method Signature:
System.Object[] GetList(System.String)
- listname: List name.
Description:
Returns array of all entries in the list, for use with for loop etc.
Example:
GetList("list")
Method Signature:
Boolean InList(System.String, System.Object)
- listname: List name.
- value: Integer value - See description for usage.
Description:
Checks whether a list contains a given element.
Example:
if InList("shmoo", 1):
Method Signature:
Int32 List(System.String)
- listname: List name.
Description:
Returns the number of entries in the list.
Example:
if List("list") < 5:
Method Signature:
Boolean ListExists(System.String)
- listname: List name.
Description:
Returns true if list exist, or false if not.
Example:
if ListExists("list"):
Method Signature:
Int32 PopList(System.String, System.Object)
- listname: List name.
- elementvalue: Element value to remove from list, or 'front' to remove the first item, or 'back' to remove last entry, default 'back'. (Optional)
Description:
Remove elements from a list, returns the number of elements removed
Example:
CreateList("hippies")
PushList("hippies", 1)
PushList("hippies", 2)
PushList("hippies", 3)
PopList("hippies", "front") # Removes 1
PopList("hippies", "back") # Removes 3
PopList("hippies", "2") # Removes any 2's that exist in the list
for x in GetList("hippies"):
print x # Never reached because list is empty
Method Signature:
Void PushList(System.String, System.Object)
- listname: List name.
- value: Integer value - See description for usage.
Description:
Pushes a value to the end of the list, will create list if it doesn't exist.
Example:
PushList("list", 1)
Method Signature:
Void RemoveList(System.String)
- listname: List name.
Description:
Removes the list with the given name.
Example:
RemoveList("list")