Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Composite boolean expressions


Message #1 by "Inge Larsson" <inge.larsson@c...> on Fri, 31 Aug 2001 14:05:45
Thanks, Robert, for this quick correction of my code! /Inge

> No, you shouldn't need to do that.
> 
> But why do you have quotes on 'true'?
> And it's only one = before -1.
> It should be == -1 or != -1.
> 
> The phrase should rather be:
> 
> (minus && fld.value == "" && strMinus.indexOf(key) == -1)
> 
> 
> /Robert
> 
> 
> -----Original Message-----
> From: Inge Larsson [mailto:inge.larsson@c...] 
> Sent: den 31 augusti 2001 16:06
> To: javascript
> Subject: [javascript] Composite boolean expressions
> 
> 
> Hi,
> 
> Is it possible to construct a boolean expression with more than two 
> subexpressions? E.g. does not
> 
> (minus == 'true' && fld.value == "" && strMinus.indexOf(key) = -1)
> 
> work for me as an if statement condition, even if I parenthesize two of 
> the subexpressions. Do I have to separate this conditional test into 
> several nested if statements or some else construction?
> 
> Inge
> 
> 

  Return to Index