Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
ggrigo01
ggrigo01's Profile
1
Posts
2
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
expecting EOF found 'for'
[7 Replies]
08-Apr-2013 09:59 AM
Forum:
Programming Questions
Hi,
I am absolutely new to Processing.
I have the following code and it is giving me the error on the line of the FOR loop.
Any suggestions will be greatly appreciated.
Also is it possible in Processing to loop through the string in the way I am trying to?
Thanks.
class Pair {
String letter;
int count;
Pair (String l, int n) {
letter = l;
count = n;
}
void Increment(){
n += 1;
}
void Display(){
println(letter + " " + count);
}
}
String alphabet = "ABCDEFGHIJKLMNOPQRSTUWXYZ";
for (int i = 0; i < alphabet.length; i = i+1) {
println(alphabet[i]);
}
«Prev
Next »
Moderate user : ggrigo01
Forum