SORT

SORT N

SORTS THE CONTENT OF THE SYSTEM OBJECT NUMBER N

  • Type: Command
  • Parameter: 1
  • Group: System Objects

ACTION

The command SORT N sorts in ascending order all the items of the system object designated by its number N.

Remark: The command must be renewed every time the content of the system object must be sorted.

SYNTAX: SORT N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • The command SORT is used to sort the content of a system object COMBO, LIST or DLIST.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : COMBO, LIST, DLIST.

EXAMPLE

rem create a LIST

list 1

rem add 3 lines

item_add 1,"BBB"

item_add 1,"CCC"

item_add 1,"AAA"

rem sort its content

sort 1

rem add one item

item_add 1,"ABC"

rem the order is : AAA,BBB,CCC,ABC

SEE ALSO

SORT_ON

SORT_OFF