void = List_Delete(sListVarName, nIndex)
This macro function is used to remove the nIndex-th entry of a list sListVarName.
IMPORTANT: do not confuse the functions List_Destroy and List_Delete.
•List_Destroy destroys (removes from memory) the entire list.
•List_Delete removes a single entry from a list.
Additionally, when calling List_Delete to remove an entry while iterating through a list, it is usually better to perform the iteration backward, so that the effects of deleting some of the list entries are behind you.
// iterate though the list backwards
for nList = List_Count(sListHolNames) to 1 step -1
   sCurString = List_GetString(sListHolNames, nList)
   if pos('*DELETE*', sCurString) > 0
      List_Delete(sListHolNames, nList)
   endif
endfor
See also: List_Add.
Topic 188535, last updated on 21-Jun-2025