Switch statement breaks if value changes after on init
-
Run the snippet and hit the button. The Console will print "ZERO OR EQUAL" because the two knobs have the same value. Now change the value of both knobs to 4 and press the button again. Even though both knobs have the same value it will now print "DEFAULT".
This is either a bug or a failure to tell me I'm doing something I shouldn't be (I'm pretty sure the cases have to be constants...)
HiseSnippet 1023.3ocyV01aaaCDlxIJsxaqXcn+.DB1GrAJBr8Z6FVwvbheovnwIdwIAa6CsfVhJlvTjBjTowaH.6mx9I1+AsGojijqMxKFX.S.1fGu643ych2cZjTDPTJgD43c57DBx4qcGOmqm1YJlxQC5hbdh6PrRSj9Yacv7DrRQBQNNa8FyFNdairOe7WO.yv7.RwVHz4BZ.4PZLUWr6n1ukxX8wgjSowkr9EsGDH3cDLQJvmsbafRvAyvWPNBaLqhKxYmdgTsPNVi0DEXyAhv4imJ9.Oy9yoJ5DFwHzDMFbT11nNSorvQKhUEB4r8nhHeqrH+YtCogza1uHC7sVE9EHJmCbpbaTp4CfRNknz1YT5otiCjzDcgFCe9J2Ab3ERDFR0koRlsnJ5JtcDfEb8dw3Yj9RP3FD0dUiFO2G9q9qqVER2Js+kXo+a4hIM8+E+E.ufn6HhSDbPn1tVs6BHVFPqaEPKCfpTNixI9Qo7.MUv8gjjtV8p+cUO0Gn5fo90rN2f+bLKkTqd8pdfVu.rh323mWrx5wRVYT3AGtRvH6kHolS8O6cxw9Geheue6r8Ozb5fISjD7L6J3WHIBmxzqCa2d82+rCO0h55pWWcUlK3Gjp0BdSSHKErZAKh2mCYDfT1nhF4WKWxyKKXec0qgDw5ST4tb256oL6acbGLiMAt4W6KOQvSkXyQBM4XdVtDHr+WpJJZs5x8EiHWqZSIo71.VimFOgHKGyFCg6rKWHry8qPHHKsTxPAe.mpONgjK2WvBMWvMqWsrAkmWgBnJ4LDLUaKedRd4yXFMjHQTvIOx0dcCYIeQqmG2FcuA2ZMfOaPWrFaJhyoCPwDhTSMYBmtjKgtfYkzdtcIpYZQBbP2bO.Z6dmL9Jjiqyb33laV7NXgRO2jO2wZ.JlFFxHiDJp48UA6dVan6cxX5eAl551buFfk7xsniwWUH98sUoQQzqrsainrXkF3yfXnKLx46bOCpDyKh7Uy.+.kHyHgmJr1id.ATKToS8csmeiv+D09+0A1iVNvxpPsAlmad4ZoP6e0kBMzezlpFJhA+fkv1NUHbLTSXFubHAK4lt3J7kjA7QRBzPvHiVcr.LPRDlxv5kmRYFGmqvjnJOZvz9mCIv4kGW+.Fc03VGcceo3ScGYZ4udNVYMbzTT+e.GyG3+Mt8hhHA5BBtsa+eeSmteGG+IhTMkewPLbsyTJeTZ7X36bBHvoy4DlxTUWwzOKStgQ1jAFS3gVgOAO4JaZjcxU1bgR3BefT79frFYlOo3w1c.NwseAkG7obfr+Js+PlhL56CBV1Uq.r0lB7G1TfuXSA9xME3q1Tf+3lB7mtaflND6mpEwYkMHzvQ8rSbbb5YagXush9rdMlCw
-
"In a switch statement, the cases are evaluated at compile time, meaning they need to be constants or literals known at compile time."
-
-
Aha that explains it. And no one replied to your wonderful post, how rude!
-
-
-
@d-healey I got one like so it‘s not nothing…