TmListDelete Procedure
Deletes an item in the specified list.
Usage
TmListDelete, tool_name, list_name [, pos]
Input Parameters
tool_name—A string specifying the unique name of a VDA Tool.
list_name—A string specifying the unique name of a list.
pos—(optional) An integer specifying the position in the list of the item to delete. The first item is 0, the second item is 1, and so on. If pos is not specified, the last item in the list is deleted.
Keywords
None.
Discussion
This procedure defines the behavior of the TM_LIST_DELETE method.
Example
The following code creates a list, removes the last element in the list, and then removes the first item in the list.
; Removes the last element in the list.
list_name = TmList(tool_name)
TmListAppend, tool_name, list_name, 'First Item'
TmListAppend, tool_name, list_name, 2L
TmListAppend, tool_name, list_name, 3.3
INFO, TmListRetrieve(tool_name, list_name), /Full
; PV-WAVE prints the following:
; <Expression> LIST = List(3)
; STRING = 'First Item'
; LONG = 2
; FLOAT = 3.30000
TmListDelete, tool_name, list_name
INFO, TmListRetrieve(tool_name, list_name), /Full
; PV-WAVE prints the following:
; <Expression> LIST = List(2)
; STRING = 'First Item'
; LONG = 2
; Removes the first item in the list.
TmListDelete, tool_name, list_name, 0
INFO, TmListRetrieve(tool_name, list_name), /Full
; PV-WAVE prints the following:
; <Expression> LIST = List(1)
; LONG = 2
See Also
Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.