Good evening, all. I'm new to Processing and new to these boards, so forgive me if this has been covered before. (I searched, so I don't think it has.)
I am not sure if this is a syntax question or a bug. For whatever reason, Processing will not let me set a variable value (without declaring it at the same time) before setup(). For example, this works fine:
Code:int varName;
int otherVarName = 100;
But this does not:
Code:int varName;
varName = 100;
This latter example triggers an "unexpected token: void" error once the compiler hits setup().
For reasons of code cleanliness and personal style, I may prefer to declare my variables first, and then assign them values later. But it looks like Processing will only let me either (A) just declare them, and assign values later (like within draw()), or (B) declare and assign value in one statement.
Any thoughts? Is this a syntactical issue? Thanks in advance.