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)
   val1[i] = val2[i]; // how to not make a pointer?
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: val1[i] = val2[i]; // how to not make a pointer?  (Read 246 times)
Brad


val1[i] = val2[i]; // how to not make a pointer?
« on: Jul 13th, 2003, 2:16am »

i'm a little confused about the different things that can happen when you use the "=" operator. it seems like in some cases it puts the value of the item on the right into the item on the left. (this is what i had come to expect.)  
 
sometimes it seems like it makes one a pointer to the other so that they no longer act like seperate variables. what is happening and is there a way to stop that?
 
any references to online docs on the subject would be appreciated.
 
thanx.
 
 
benelek

35160983516098 WWW Email
Re: val1[i] = val2[i]; // how to not make a pointe
« Reply #1 on: Jul 13th, 2003, 5:02am »

in the case of copying arrays and array data, you can use System.arraycopy(arrayFrom,startPoint,arrayTo,startPoint,numberOfItems)
 
the java tutorial on sun's website is quite good for this topic: http://java.sun.com/docs/books/tutorial/java/index.html
 
Pages: 1 

« Previous topic | Next topic »