Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
gaga.signor
gaga.signor's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
probalbly simple programming question regarding variable assignment
[4 Replies]
29-Aug-2012 06:00 AM
Forum:
Programming Questions
Dear all,
maybe this is stupid question, but I can't get over it for hours now ...
Whats wrong with the following code? Everytime I run it, the result is, that also b[0] equals 2, but only a[0] was assigned ...
Thnaks in advance from
Christian (Austria)
float[] anull= {0, 0};
Ball balla;
void setup()
{
balla = new Ball(anull, anull);
}
void draw()
{
balla.test();
stop();
}
class Ball {
float a[];
float b[];
Ball(float[] ain, float[] bin) {
a=ain;
b=bin;
}
void test() {
a[0]=2;
println (b[0]);
}
}
«Prev
Next »
Moderate user : gaga.signor
Forum