Difference between revisions of "Sort Command"

From GeoGebra Manual
Jump to: navigation, search
m (1 revision)
(added v.4 - note/example formatting)
Line 1: Line 1:
<noinclude>{{Manual Page}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
+
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
 
{{command|list}}
 
{{command|list}}
 
; Sort[List]: Sorts a list of numbers, text objects, or points.
 
; Sort[List]: Sorts a list of numbers, text objects, or points.
: Note: Lists of points are sorted by ''x''-coordinates.
+
: {{Note| Lists of points are sorted by ''x''-coordinates.}}
: Examples:
+
 
 +
: {{Example|
 
:* <tt>Sort[{3, 2, 1}]</tt> gives you the list ''{1, 2, 3}''.
 
:* <tt>Sort[{3, 2, 1}]</tt> gives you the list ''{1, 2, 3}''.
 
:* <tt>Sort[{"pears", "apples", "figs"}]</tt> gives you the list elements in alphabetical order.
 
:* <tt>Sort[{"pears", "apples", "figs"}]</tt> gives you the list elements in alphabetical order.
:* <tt>Sort[{(3, 2), (2, 5), (4, 1)}]</tt> gives you ''{(2, 5), (3, 2), (4, 1)}''.
+
:* <tt>Sort[{(3, 2), (2, 5), (4, 1)}]</tt> gives you ''{(2, 5), (3, 2), (4, 1)}''.}}

Revision as of 12:34, 14 February 2011


Sort[List]
Sorts a list of numbers, text objects, or points.
Note: Lists of points are sorted by x-coordinates.
Example:
  • Sort[{3, 2, 1}] gives you the list {1, 2, 3}.
  • Sort[{"pears", "apples", "figs"}] gives you the list elements in alphabetical order.
  • Sort[{(3, 2), (2, 5), (4, 1)}] gives you {(2, 5), (3, 2), (4, 1)}.
© 2024 International GeoGebra Institute