Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
List lines | YES | NO | NO | All |
Clear line in list {line-number (calculation)}
This command has been deprecated and is no longer visible in the Code Assistant in the Code Editor (it will not appear when you type the first few characters), although it is still present in Omnis Studio and will continue to function if used in legacy code. You can show this command by disabling the appropriate Command Filter in the Modify menu in the Code Editor.
This command clears the values stored in the specified line of the current list. You can specify the line number in a calculation, otherwise the current line (LIST.$line) is used. The flag is cleared if the list is empty or if the line is beyond the current end of the list.
# Clear values from any lines in the list that have a
# balance equal to zero
Set current list lMyList
Define list {lName,lBalance}
Add line to list {('Fred',100)}
Add line to list {('George',0)}
Add line to list {('Harry',50)}
For each line in list from 1 to lMyList.$linecount step 1
If lst(lBalance)=0
Clear line in list
End If
End For
# Alternatively you can use $clear to clear the values
# of a particular line
Do lMyList.1.$clear()