Re: Short-circuit warning

new topic     » goto parent     » topic index » view thread      » older message » newer message

Andy Drummond wrote:
> 
> When I first used Euphoria the docs DID describe the short-circuiting process.
> It was very clear, and made coding easier with things like:
> }}}
<eucode>
>     if atom(res) or length(res)=0 or res[1]='+' then
>         do something
>     end if
> </eucode>
{{{

> To do that with three nested if statements would be silly.

By the way, it used to be that short ciruiting was significantly slower than
coding multiple IFs. I don't know if that situation has changed or not.


-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu