Clear list

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


Clear list ([Hash lists])


Hash lists If specified, the command clears #L1-#L8 rather than the current list. When this option is specified, the command is not reversible


This command clears all the lines in the current list and frees the memory they occupy. It does not alter the definition of the list. If you use Clear list as part of a reversible block, the list lines will be reloaded when the method containing the reversible block finishes. The list is only reloaded if it occupies 50,000 bytes of storage or less. Executing Clear list for a smart list sets $smartlist to kFalse, meaning that it is no longer a smart list.

The All Lists option only clears the hash variable lists #L1 to #L8: all other lists including task, class, instance and local variable lists, are not cleared by this command.

The following method builds a list of data formats depending on the type of graph selected by the user. Before the method is built the list is cleared using the Clear list command; this ensures the list is initialized and completely empty of data.


Set current list iMyList
Clear list
; or you can do it like this
Do iMyList.$clear()