Here are various examples of TMemories list functions:
TM_List_Add
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
`Create list
List1 = TM_List_Create(Data_Type_Double)
`Modify list
For Counter = 1 To 5
TM_List_AddNum List1, (Counter * 10.5)
Next
`Display list's content
For Counter = 1 To 5
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
`Main loop
While ScanCode()= 0
EndWhile
TM_List_Insert
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
Global Index As Integer
`Create list
List1 = TM_List_Create(Data_Type_String)
`Modify list
For Counter = 1 To 5
TM_List_AddStr List1, Str$(Counter)
Next
Index = 2
For Counter = 1 To 5
TM_List_InsertStr List1, Index, "---"
Inc Index, 2
Next
`Display list's content
For Counter = 1 To 10
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
`Main loop
While ScanCode()= 0
EndWhile
TM_List_Remove
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
Global Index As Integer
`Create list
List1 = TM_List_Create(Data_Type_String)
`Modify list
For Counter = 1 To 10
TM_List_AddStr List1, Str$(Counter)
Next
Index = 2
For Counter = 1 To 5
TM_List_Remove List1, Index
Inc Index, 1
Next
`Display list's content
For Counter = 1 To 5
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
`Main loop
While ScanCode()= 0
EndWhile
TM_List_Reverse
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
Global Index As Integer
`Create list
List1 = TM_List_Create(Data_Type_String)
`Modify list
For Counter = 1 To 10
TM_List_AddStr List1, Str$(Counter)
Next
TM_List_Reverse List1
`Display list's content
For Counter = 1 To 10
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
`Main loop
While ScanCode()= 0
EndWhile
TM_List_Search
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
Global Index As Integer
`Create list
List1 = TM_List_Create(Data_Type_String)
`Modify list
For Counter = 1 To 10
TM_List_AddStr List1, "Item #" + Str$(Counter)
Next
`Display list's content
For Counter = 1 To 10
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
Text 10, 240, "'Item #5' at " + Str$(TM_List_SearchStr(List1, "Item #5"))
`Main loop
While ScanCode()= 0
EndWhile
TM_List_Sort
`Constants
#Constant Data_Type_Byte 1
#Constant Data_Type_Short 2
#Constant Data_Type_Long 3
#Constant Data_Type_Integer 3
#Constant Data_Type_Single 4
#Constant Data_Type_Float 4
#Constant Data_Type_Double 5
#Constant Data_Type_String 6
`Variables
Global List1 As Integer
Global Counter As Integer
Global Index As Integer
`Create list
List1 = TM_List_Create(Data_Type_String)
`Modify list
For Counter = 1 To 10
TM_List_AddStr List1, "Item #" + Str$(Rnd(100))
Next
TM_List_Sort List1
`Display list's content
For Counter = 1 To 10
Text 10, (20 * Counter), Str$(Counter) + ") " + TM_List_ReadStr(List1, Counter)
Next
Text 10, 240, "*Keep in mind, this string-list was sorted alphabeticaly not numerically."
`Main loop
While ScanCode()= 0
EndWhile