Variable Assignment Error
in
Programming Questions
•
3 years ago
I am new to Processing (although I have considerable experience with other languages) and have been going through the new O'Reilly book. I am currently running Processing 1.2 on Windows. When I try and assign variables as either directed from the book or using the Processing reference I am getting errors, which seem to indicate it thinks I want to cast, not assign, a variable. Here is sample code:
processing.app.debug.RunnerException: expecting LPAREN, found ';'
I have also tried variable assignment on a single line (what the book suggests: int y = 60; ) with the similar results (expecting LPAREN, found '=').
The only reason I can find that it would want an LPAREN at this point would be if I was casting (e.g. float f = 60.2; int i = int(f);), but I am not and have no desire to cast these numbers.
Does anyone know what is going on here and if there's something that is misconfigured on my end or if there's some kind of bigger problem? I can't imagine this has gotten to this point without variables working properly, so there must be something goofy going in in my installation.
Thanks.
- size(480, 120);
- smooth();
- int y;
- y = 60;
- int d;
- d = 80;
- ellipse(75, y, d, d);
processing.app.debug.RunnerException: expecting LPAREN, found ';'
I have also tried variable assignment on a single line (what the book suggests: int y = 60; ) with the similar results (expecting LPAREN, found '=').
The only reason I can find that it would want an LPAREN at this point would be if I was casting (e.g. float f = 60.2; int i = int(f);), but I am not and have no desire to cast these numbers.
Does anyone know what is going on here and if there's something that is misconfigured on my end or if there's some kind of bigger problem? I can't imagine this has gotten to this point without variables working properly, so there must be something goofy going in in my installation.
Thanks.
1