home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / lsort.n < prev    next >
Text File  |  1993-05-07  |  3KB  |  73 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/lsort.n,v 1.2 93/05/07 16:48:45 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS lsort tcl 7.0
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. lsort \- Sort the elements of a list
  29. .SH SYNOPSIS
  30. \fBlsort \fR?\fIswitches\fR? \fIlist\fR
  31. .BE
  32.  
  33. .SH DESCRIPTION
  34. .PP
  35. This command sorts the elements of \fIlist\fR, returning a new
  36. list in sorted order.  By default ASCII sorting is used with
  37. the result returned in increasing order.
  38. .VS
  39. However, any of the
  40. following switches may be specified before \fIlist\fR to
  41. control the sorting process (unique abbreviations are accepted):
  42. .TP 20
  43. \fB\-ascii\fR
  44. Use string comparison with ASCII collation order.  This is
  45. the default.
  46. .TP 20
  47. \fB\-integer\fR
  48. Convert list elements to integers and use integer comparison.
  49. .TP 20
  50. \fB\-real\fR
  51. Convert list elements to floating-point values and use floating
  52. comparison.
  53. .TP 20
  54. \fB\-command\0\fIcommand\fR
  55. Use \fIcommand\fR as a comparison command.
  56. To compare two elements, evaluate a Tcl script consisting of
  57. \fIcommand\fR with the two elements appended as additional
  58. arguments.  The script should return an integer less than,
  59. equal to, or greater than zero if the first element is to
  60. be considered less than, equal to, or greater than the second,
  61. respectively.
  62. .TP 20
  63. \fB\-increasing\fR
  64. Sort the list in increasing order (``smallest'' items first).
  65. This is the default.
  66. .TP 20
  67. \fB\-decreasing\fR
  68. Sort the list in decreasing order (``largest'' items first).
  69. .VE
  70.  
  71. .SH KEYWORDS
  72. element, list, order, sort
  73.