Re: can switch work for this?
- From: Dr J R Stockton <reply0928@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 12 Jul 2009 17:16:38 +0100
In comp.lang.javascript message <73sh551r03iguq8203mcssnvovporegvh8@4ax.
com>, Sat, 11 Jul 2009 21:07:40, Geoff Cox <gcox@xxxxxxxxxx> posted:
On Sat, 11 Jul 2009 19:07:39 +0200, Lasse Reichstein Nielsen
<lrn.unread@xxxxxxxxx> wrote:
Thanks for your reply Lasse.
x ='yes' && (a==true||b==true||c==true)
x = 'no' && a==true
x = 'no' && b==true
x = 'no' && c==true
What if x=='no' and both a and b are true? Can you say something about
the possible combinations of values?
Only one of a, b, or c can be true at any one time.
At most one, I think you mean; otherwise, most of the first quoted
statement looks unnecessary. If so, you might do better to encode their
combined state as abc = 0 (none), 1 (a), 2 (b) or 3 (c) . Then,
if (abc) tests for any one being true.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
.
- Follow-Ups:
- Re: can switch work for this?
- From: Geoff Cox
- Re: can switch work for this?
- References:
- can switch work for this?
- From: Geoff Cox
- Re: can switch work for this?
- From: Lasse Reichstein Nielsen
- Re: can switch work for this?
- From: Geoff Cox
- can switch work for this?
- Prev by Date: Re: Size of cookie and splitting strings
- Next by Date: Re: FAQ Topic - How do I change the text in the url/location bar? (2009-07-11)
- Previous by thread: Re: can switch work for this?
- Next by thread: Re: can switch work for this?
- Index(es):
Relevant Pages
|
Loading