-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Original author: [email protected] (December 31, 2011 06:50:51)
Once you have another PApplet defined, Any syntax error (e.g. a stray character or missing semicolon), gets reported as "unexpected void" on the setup. Meaning it becomes laborious to find even the simplest syntax error -- involving going through all the code commenting and uncommenting blocks until the error goes away. And doing this every time a new syntax error is introduced.
To see simply, first:
void setup()
{
int a=0;
}
void draw()
{
int b=0;
*
}
Note the '*' is there intentionally. When you run, you get a nice error showing just where the problem is. Now add a couple lines:
void setup()
{
int a=0;
}
void draw()
{
int b=0;
*
}
public class newApp extends PApplet {
}
Suddenly this error (and any other you might introduce) are all reported as unexpected void in setup.
Original issue: http://code.google.com/p/processing/issues/detail?id=952