We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
array manipulation (Read 3341 times)
array manipulation
Apr 25th, 2005, 5:40pm
 
these things can be handled by System.arraycopy, but could be nice if there were more array manipulation options available in processing, such as copying portions of arrays and searching arrays for values (like indexOf()).

though the latter is probably better left as something people can learn to program with loops, the former could be handy for those not aware of System.arraycopy.
Re: array manipulation
Reply #1 - Apr 25th, 2005, 6:13pm
 
anything in particular? have you found the new splice, subset, sort, etc functions yet?
Re: array manipulation
Reply #2 - Apr 25th, 2005, 8:49pm
 
Quote:
have you found the new splice, subset, sort, etc functions yet?


nope, where are those?  can't find em in reference, online or off, nor in revisions...

splice, subset, and sort all sound like what i was thinking.  creating subsets is what caused this post in the first place.
Re: array manipulation
Reply #3 - Apr 25th, 2005, 8:54pm
 
oops, found em, in the 'complete' reference.

how bout that, i didn't even realize there was a 'complete' reference until now...i understand the desire to keep things simple for the beginners, but perhaps there is a way to make the complete reference more noticable?  maybe just in the reference title image - instead of "Language (API)", do like you do in the title tag, "Abridged Language" and "Complete Language".

wow.  i didn't realize how extensive the reference was getting!  good work, casey...
Re: array manipulation
Reply #4 - Apr 25th, 2005, 10:40pm
 
oop.  just tried to use the new array functions, but found that they only work with built-in datatypes.

i can just use java.util.ArrayList ( http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html ), but are there plans for these functions to be applicable to custom datatypes?
Re: array manipulation
Reply #5 - Apr 25th, 2005, 11:51pm
 
yeah, working on getting versions for custom datatypes in there as well, just ran out of time to finish for beta.

ArrayList will require that anyone using your work has java 1.2+, which is a current requirement for processing but will go away.
Re: array manipulation
Reply #6 - Apr 27th, 2005, 1:09am
 
I notice that you can't currently append an array to a two dimensional array (no applicable overload). Will that come along with the custom data types?
Re: array manipulation
Reply #7 - Apr 27th, 2005, 3:19am
 
i think we're gonna stay away from the 2+ dimensional stuff since it gets pretty messy from there. it's possible they'll sort of work, will have to see the mechanics once they're finished.
Re: array manipulation
Reply #8 - Jul 28th, 2005, 5:55pm
 
status of this issue can now be tracked via the bugs db:
http://dev.processing.org/bugs/show_bug.cgi?id=115
Page Index Toggle Pages: 1