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_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   array of colors?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: array of colors?  (Read 384 times)
mawend

Email
array of colors?
« on: Feb 12th, 2003, 8:01am »

I can't seem to make an array of datatype color. For example,
 
color[] c;
 
generates a "Cannot find class 'color' [JLS 8]" error.
 
 
I'd like to create a color lookup list. I suppose I could store three separate int arrays, one for each R, G, and B component, but that's clunky.
 
Any idea why the color[] fails?
 
thanks
 
fry


WWW
Re: array of colors?
« Reply #1 on: Feb 12th, 2003, 1:27pm »

this is a bug in the parser.. use 'color c[]' instead of 'color[] c' and it'll work the same.  
 
to init the thing with 10 elements, use 'color c[] = new int[10]'.  
 
this is a bug that we hope to fix soon.
 
(this was written up somewhere else, but we must've lost it)
 
fry


WWW
Re: array of colors?
« Reply #2 on: Mar 5th, 2003, 10:28pm »

fixed in 0052, which will be available within the next few hours from the download location. let us know if it's still broken.
 
Pages: 1 

« Previous topic | Next topic »