COLOUR:STANDARD
POSITION:028,114
TEXT:00,To sort a sequence to be searched, you use the sort() library routine.
COLOUR:EUPHORIA
TEXT:32,include sort.e
COLOUR:POINTS
TEXT:16,rs        s
COLOUR:EUPHORIA
TEXT:00,   = sort( )
COLOUR:STANDARD
TEXT:32,sort() sorts sequence  , but does not change  . The sorted sequence is
COLOUR:POINTS
TEXT:00,                      s                      s
COLOUR:STANDARD
TEXT:16,instead stored in receiving variable   . The sequence to be sorted can be
COLOUR:POINTS
TEXT:00,                                     rs
COLOUR:STANDARD
TEXT:16,made up of any combination of atoms and sequences. The result of the sort
TEXT:16,will be a sequence with its elements sorted in ascending order, with
TEXT:16,any atom values appearing first before sequence elements. Elements that
TEXT:16,are sequences are sorted based on an element by element comparison,
TEXT:16,starting with the first element onward. The comparison is based on the
TEXT:16,ASCII value of each element.
TEXT:32,Run a demo program now that demonstrates how sort() works with sample
TEXT:16,data.
