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)
   functiuon that returns an array?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: functiuon that returns an array?  (Read 2463 times)
lunetta

7200475272004752 WWW Email
functiuon that returns an array?
« on: Apr 4th, 2005, 3:14am »

Hello  
 
I might be a little dumb, or just suffering caffeine injury, but I'm not being able to construct a function that would return an array;any idea on the syntax of it?
I've been trying stuff like
int[] output() {
 return {1,2,3};  
}
 
but it doesn't seem to work..
 
 
mKoser

WWW Email
Re: functiuon that returns an array?
« Reply #1 on: Apr 4th, 2005, 10:58am »

this works:
 
Code:

int[] output(){
  int[] myArr = {1, 2, 3};
  return myArr;
}

 
+ m
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
lunetta

7200475272004752 WWW Email
Re: functiuon that returns an array?
« Reply #2 on: Apr 4th, 2005, 7:43pm »

I was almost there!
 
Pages: 1 

« Previous topic | Next topic »