Here is my sketch:
enum Foo { bar, baz }
void setup() { }
void draw() { }
This fails to compile:
Unrecognized type:46 (ENUM_DEF)
Am I doing something wrong, or are enums not supported?
Here is my sketch:
enum Foo { bar, baz }
void setup() { }
void draw() { }
This fails to compile:
Unrecognized type:46 (ENUM_DEF)
Am I doing something wrong, or are enums not supported?
Looks like they aren't supported unfortunately, but there are some workarounds. From the FAQ:
If you're comfortable with Java, you can always base your project in Java and access the Processing code via traditional Java classes. The FAQ has some pointers on that too.