Multiple conditions in "if" statement?

I know this has been talked about before, but never satisfactorily (and
just
to preempt - “or” isnt “and”). Is there any reason for not enabling
"and"s
in “if” conditions? Are there any plans to do so?

-jf


In the meantime, here is your PSA:
“It’s so hard to write a graphics driver that open-sourcing it would not
help.”
– Andrew Fear, Software Product Manager, NVIDIA Corporation

What’s wrong with “&&”?

– Josh

Jeffrey ‘jf’ Lim wrote:

I know this has been talked about before, but never satisfactorily (and
just
to preempt - “or” isnt “and”). Is there any reason for not enabling
"and"s
in “if” conditions? Are there any plans to do so?

-jf


In the meantime, here is your PSA:
“It’s so hard to write a graphics driver that open-sourcing it would not
help.”
– Andrew Fear, Software Product Manager, NVIDIA Corporation
An Interview With Linus Torvalds: Linux and Git - Part 1 | Tag1 Consulting

On Jul 21, 2008, at 1:28 AM, Jeffrey ‘jf’ Lim wrote:

I know this has been talked about before, but never satisfactorily
(and just to preempt - “or” isnt “and”). Is there any reason for not
enabling "and"s in “if” conditions? Are there any plans to do so?

Wait, does this mean ‘or’ works in if conditions?

Yes, && works for me:

if 1 == 1 && 2 == 2; puts “this worked”; end
this worked
=> nil

– Josh

Sean A. wrote:

On Jul 21, 2008, at 1:28 AM, Jeffrey ‘jf’ Lim wrote:

I know this has been talked about before, but never satisfactorily
(and just to preempt - “or” isnt “and”). Is there any reason for not
enabling "and"s in “if” conditions? Are there any plans to do so?

Wait, does this mean ‘or’ works in if conditions?

Neither && nor || are valid in nginx if statements. This isn’t
ruby. See http://wiki.codemongers.com/NginxHttpRewriteModule#if for
more information.

Sorry, I’m a huge idiot… I didn’t look at what forum this was coming
from. My bad, I’ll start looking at that… :slight_smile:

Eden Li wrote:

Neither && nor || are valid in nginx if statements. This isn’t
ruby. See http://wiki.codemongers.com/NginxHttpRewriteModule#if for
more information.

On Jul 24, 2008, at 1:22 PM, Eden Li wrote:

Neither && nor || are valid in nginx if statements. This isn’t
ruby. See http://wiki.codemongers.com/NginxHttpRewriteModule#if for
more information.

I could have been all excited for a moment.
&& and || in if statements would make my conf files so much easier to
maintain.

On Fri, Jul 25, 2008 at 3:24 AM, Sean A.
[email protected]
wrote:

maintain.
yeah I got excited. For a while too. Until i tried it :confused: So i’m assuming
there’s no work, or no plan for this atm?

-Jeff

On Jul 24, 2008, at 10:24 PM, Jeffrey ‘jf’ Lim wrote:

&& and || in if statements would make my conf files so much easier
to maintain.

yeah I got excited. For a while too. Until i tried it :confused: So i’m
assuming there’s no work, or no plan for this atm?

i would add it but i havent done any C programming since Be Inc. went
under in the 90s so I would probably fubar it.

On Mon, Jul 21, 2008 at 1:59 PM, Joshua A. [email protected]
wrote:

What’s wrong with “&&”?

does this work for you?

-jf