You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i try to switch on an string i get this Error:
Cannot switch on a vlaue of type String. Only convertible int values or enum constatnts are permitted.
I know switching on String is not possbile in Java 1.6, but I'm using Processing V. 2.2.1, which has Java Version 1.7.0_40 (found out with: print(System.getProperty("java.version")); ).
This seems to be a bug in the error detection system.
It's hard, because it involves the preprocessor. It's at least a few hours of work for someone to do it (and then update the reference accordingly), and there is no someone to do it.
But regardless, it's not a "bug". It's a feature we've never had.
Activity
benfry commentedon Jan 19, 2015
It's not supported by the preprocessor, but we've never claimed it works: http://processing.org/reference/switch.html
Use an
if()statement instead.siiikooo0743 commentedon Jan 20, 2015
Well i know, but it should be supported anyway.
I'm no expert, but how hard can it be to get it to work ^^
benfry commentedon Jan 20, 2015
It's hard, because it involves the preprocessor. It's at least a few hours of work for someone to do it (and then update the reference accordingly), and there is no someone to do it.
But regardless, it's not a "bug". It's a feature we've never had.
siiikooo0743 commentedon Jan 20, 2015
Ok i undserstand.
Thank you for your efforts anyway.
github-actions commentedon Jun 16, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.