Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
ajw85
ajw85's Profile
1
Posts
0
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
this. versus just =
[2 Replies]
24-Aug-2010 04:31 PM
Forum:
General Discussion
I'm a total java / processing newb and i've been going through tutorials and what not and found this.y = 12345
what is the point of this., where just setting = to creates the same thing?
example
float ypos = 50;
void setup() {
size(100, 100);
noLoop();
}
void draw() {
line(0, 0, 100, ypos);
this.ypos = 100;
line(0, 0, 100, ypos);
this.ypos = 150;
line(0,0,100, ypos);
}
is the same result as
float ypos = 50;
void setup() {
size(100, 100);
noLoop();
}
void draw() {
line(0, 0, 100, ypos);
ypos = 100;
line(0, 0, 100, ypos);
ypos = 150;
line(0,0,100, ypos);
}
any reason why?
«Prev
Next »
Moderate user : ajw85
Forum