So what is the difference between these sort of constructs and 

action1() if $cond1 ;
action2() if $cond2 ;
action3() if $cond3 ;

I know which I'd like to read in code I am trying to understand!
Richard


> -----Original Message-----
> From: Piers Cawley [SMTP:[EMAIL PROTECTED]]
> Sent: 21 January 2002 09:01
> To:   [EMAIL PROTECTED]
> Subject:      Re: Erm, Hello?
> 
> David Cantrell <[EMAIL PROTECTED]> writes:
> 
> I've seen it used as a 'switch' type operator:
> 
>    $cond1 ? action1() :
>    $cond2 ? action2() :
>    $cond3 ? action3() :
>    ...
>    $condN ? actionN();
> 
> and I'm still not sure whether I utterly hate it or not...
> 
>    $cond1 && action1() ||
>    $cond2 && action2() ||
>    ...
> 
> works just as 'well'...
> 
> -- 
> Piers
> 
>    "It is a truth universally acknowledged that a language in
>     possession of a rich syntax must be in need of a rewrite."
>          -- Jane Austen?
> 

Reply via email to