User Tools

Site Tools


numsort

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

numsort [2006/07/17 03:42] (current)
Line 1: Line 1:
 +# $EPIC: numsort.txt,​v 1.2 2006/07/17 03:42:24 jnelson Exp $
 +======Synopsis:​======
 +$__numsort__(<​list>​)
 +
 +======Technical:​======
 +This function sorts the word list //<​list>//​ in ascending numerical order.
 +The numbers in //<​list>//​ must be integral values, not decimal numbers.
 +Non-numeric words are sorted in ascii order between 0 and 1.
 +Numbers embedded within words in //<​list>//​ are properly recognized.
 +
 +======Returns:​======
 +the given list, sorted in numerical order
 +
 +======Examples:​======
 +<​file>​
 +$numsort(4 -6 34 -96 0)              returns "-96 -6 0 4 34"
 +$numsort(4 -6 34 -96 0 Erf blah)     ​returns "-96 -6 0 Erf blah 4 34"
 +$numsort(boox boo1 boo0 boo-4) ​      ​returns "boo-4 boo0 boox boo1"
 +</​file>​
 +
  
numsort.txt ยท Last modified: 2006/07/17 03:42 (external edit)