---- Original Message ----
> On Thu, 5 Feb 2004 03:00:04 +0900, Guoliang Cao wrote:
>>>> What you've written here will do alternatives checks. Thus, if you
>>>> have:
>>>>
>>>> a = "aaa"
>>>> b = "BBB"
>>>>
>>>> then "Lowercase detected" will be printed. With "AAA" and "bbb",
>>>> "Lowercase detected" will still be printed.
>> I think this is very tricky. ',' equals to '||' here. This should be made
>> very clear otherwise people should avoid use this form.

> It's not tricky at all; it's consistent with the way that case..when..end
> works at all.

I'm not saying it's inconsistent. What I mean by tricky is it's easy to
think "when a=='aaa', b=='bbb'" equals to "a=='aaa' and b=='bbb'"
especially when one never writes this kind of code by himself and reads
someone else's code.

Cao

> The form

>   case
>   when expr[, expr]+
>   when expr[, expr]+
>   else
>   end

> Is roughly equivalent to

>   case true
>   when expr[, expr]+
>   when expr[, expr]+
>   else
>   end

> In all cases, it's going to be cond === expr || cond === epxr2 (etc.), so
> that ',' is effectively an "or" condition in all case..when..end
> expressions. This is not a special case, so to speak.

> -austin
> --
> austin ziegler    * austin / halostatue.ca * Toronto, ON, Canada
> software designer * pragmatic programmer * 2004.02.04
>                                          * 13.26.16