|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> ...That's why I didn't use #switch(TRUE)-- also because, with *that*,
> the overal results--when USING the ORs--were screwy in a different way!
>
An interesting example of that:
In my code, change...
#switch(1000)
#case((strcmp(IMG_TYPE,AA) + 1000)
| (strcmp(IMG_TYPE,BB) + 1000)
| (strcmp(IMG_TYPE,CC) + 1000)
)
to...
#switch(true)
#case(
// no (strcmp(IMG_TYPE,AA), which is the only 'correct' match
(strcmp(IMG_TYPE,BB))
| (strcmp(IMG_TYPE,CC))
)
This still produces a 'true' result (the GREEN box), when neither of the #case
comparisons actually 'match'. BUT... it occurs to me that a matching 'true'
value could be ANY number (positive or negative!), just so long as it's not a
zero-- which would be a 'false' result.
Post a reply to this message
|
|