Delete selected lines

Command group Flag affected Reversible Execute on client Platform(s)
List lines YES NO NO All

Syntax

Delete selected lines

Deprecated Command

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.

Description

This command deletes all the selected lines from the current list. This is carried out in memory and has no effect on the lists stored in the data file unless a Prepare for InsertEdit command is performed.LIST.$line is unaffected unless it is left at a value beyond the end of the list, in which case it is set to LIST.$linecount.

Example

# Build a list and delete all lines except line 3
Set current list lMyList
Define list {lCol1}
For lCount from 1 to 10 step 1
  Add line to list {(lCount)}
End For
Select list line(s) (All lines)
Invert selection for line(s) {3}
Delete selected lines