I'm confused...this static value is equal to 5
user> java.awt.image.BufferedImage/TYPE_3BYTE_BGR
5
and a case statement should work like this
user> (case 5
5 "yes"
"huh?")
"yes"
but why does it work like this? Why doesn't it match?
user> (case java.awt.image.BufferedImage/TYPE_3BYTE_BGR
java.awt.image.BufferedImage/TYPE_3BYTE_BGR "yes"
"huh?")
"huh?"
The test-constant
s in a case
expression are not evaluated. So your statement is testing whether the number 5
is the same as the symbol java.awt.image.BufferedImage/TYPE_3BYTE_BGR
. Since they aren't, it falls through to the default clause.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With