FAQ
 
 
Cover  \ Exhibition  \ Learning  \ Reference  \ Download  \ Discourse   
      Language \ Environment \ Libraries \ Comparison
 
   
   
Abridged (A-Z) \ Complete (A-Z)  
   
  Reference for Processing (BETA) version 91+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.  
Name  

expand()

   
Examples  
int[] ia = {0, 1, 3, 4}; 
println(ia.length);  // Prints "4" 
ia = expand(ia); 
println(ia.length);  // Prints "8" 
ia = expand(ia, 512); 
println(ia.length);  // Prints "512" 

Description   Increases the size of an array. By default, this function doubles the size of the array, but the optional newSize parameter provides precise control over the increase in size.
   
Syntax  
expand(array)
expand(array, newSize)
   
Parameters  
array   booleans[], bytes[], chars[], ints[], floats[], or Strings[]

newSize   positive int: new size for the array

   
Returns   Array (the same datatype as the input)
   
Usage   Web & Application
   
Related   contract()
 
 






   
 
Updated: Fri Jul 15 16:35:38 PDT 2005
 
 








Creative Commons License
 
  Processing is an open project initiated by Ben Fry and Casey Reas  
  © Info