Language \ Environment \ Comparison
 
Index
 
  The Processing 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: reas at groupc.net
Name  

sort()

   
Examples  
float a[] = { 3.4, 3.6, 2, 0, 7.1 }; 
sort(a); 
for (int i = 0; i < a.length; i++) { 
  println(a[i]); 
} 


String s[] = { "deer", "elephant", "bear", "apple", "car" }; 
sort(s); 
for (int i = 0; i < s.length; i++) { 
  println(s[i]); 
} 

Description   Sorts an array of numbers from smallest to largest numbers and puts an array of words in alphabetical order.
   
Syntax  
sort(array)
   
Parameters  
array   array of strings, ints, or floats

   
Usage   Web & Application
   
   
© 2004 - 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas