ChangeCurrentElement()
语法
ChangeCurrentElement(List(), *NewElement)概要
Changes the current element of the specified list to the given new element. This function is very useful if you want to "remember" an element, and restore it after performing other processing.
参数
List() The name of the list, created with the NewList function. You must include the brackets after the list name. *NewElement The new element to set as the current element for the list. The element must be a pointer to another element which exists in this list. You should get this address by using the @ operator on the list name and not through any other method.
返回值
无.
示例
*Old_Element = @mylist() ; Get the address of the current element ResetList(mylist()) ; Perform a search for all elements named While NextElement(mylist()) ; "John" and change them to "J" If mylist()\name = "John" mylist()\name = "J" EndIf Wend ChangeCurrentElement(mylist(), *Old_Element) ; Restore previous current element (from before the search)
参阅
SelectElement()
已支持操作系统
所有