FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   Array manipulation
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Array manipulation  (Read 233 times)
Dan

WWW
Array manipulation
« on: Dec 18th, 2003, 4:41pm »

Is it possible to have a dynamic array, like in javascript.  I want to be able to define an empty array and then push items on to it.
 
Thanks
 
mflux

fluxhavoc WWW
Re: Array manipulation
« Reply #1 on: Dec 19th, 2003, 2:51pm »

Look up Vectors in the java util lib. You can find the syntax and member functions on google if you just search for java vector util.
 
Vectors are a bit slower than normal arrays but allow you to insert elements, remove elements, etc with a dynamic size. I believe that's what you're looking for.
 
Oh, and use addElement() not add(), removeElement(), not remove() if you intend for people with a lower version of Java in their browsers to be able to see it.
 
Pages: 1 

« Previous topic | Next topic »