Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #674

Re: question on a generic program logic issue

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!.POSTED!not-for-mail
From Willem <willem@toad.stack.nl>
Newsgroups alt.comp.lang.learn.c-c++, comp.programming
Subject Re: question on a generic program logic issue
Date Mon, 18 Jul 2011 10:09:48 +0000 (UTC)
Organization Stack Usenet News Service
Lines 31
Message-ID <slrnj281jc.sge.willem@toad.stack.nl> (permalink)
References <9sb227hu62qg7afpfvghvi0iuqflboe7nn@4ax.com>
NNTP-Posting-Host toad.stack.nl
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Trace mud.stack.nl 1310983788 34368 2001:610:1108:5010::135 (18 Jul 2011 10:09:48 GMT)
X-Complaints-To abuse@stack.nl
NNTP-Posting-Date Mon, 18 Jul 2011 10:09:48 +0000 (UTC)
User-Agent slrn/0.9.9p1 (FreeBSD)
Xref x330-a1.tempe.blueboxinc.net comp.programming:674

Cross-posted to 2 groups.

Show key headers only | View raw


NoName wrote:
) I'm trying to figure out how to do something in code, fairly
) efficiently, using fairly standard programming constructs.  The exact
) language doesn't matter, could be C, C++, Java, Visual Basic, C#, etc.
)
) The idea is this.  I want to have some code that basically says:
)
) if (condition1 and/or condition2 and/or condition3) then?.

Another question:  What about the precedences ?

Normally, 
 if (condition1 or condition2 and condition3)

is equivalent to
 if (condition1 or (condition2 and condition3))

instead of
 if ((condition1 or condition2) and condition3)


Which would complicate matters quite a bit.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

question on a generic program logic issue NoName <null@null.com> - 2011-07-16 02:37 -0400
  Re: question on a generic program logic issue kym@kymhorsell.com - 2011-07-16 06:52 +0000
  Re: question on a generic program logic issue Willem <willem@toad.stack.nl> - 2011-07-16 09:05 +0000
  Re: question on a generic program logic issue Keith Thompson <kst-u@mib.org> - 2011-07-16 10:46 -0700
  Re: question on a generic program logic issue Willem <willem@toad.stack.nl> - 2011-07-18 10:09 +0000

csiph-web