On Wed, May 09, 2007 at 10:25:29PM +0200, Bernhard Roider wrote:
> Andre Poenitz schrieb:
> >On Tue, May 08, 2007 at 12:13:29AM +0200, Uwe Stöhr wrote:
> >>>>if (
> >>>>       (a == 1) && (b == 1) &&
> >>>>       ((C == "bla") || (C == "blub"))
> >>>>      )
> >>>>
> >>>>   I mean how can the OR be included into an AND?
> >>>it's not a c++ question, it's just boolean algebra
> >>>
> >>>i don't think it's possible
> >>Why that? In Delphi I use such contructs very often. The syntax would 
> >>then be
> >>
> >>if (a = 1) and (b = 1) and
> >>   ( (C = "bla") or (C = "blub") ) then
> >>
> >>
> >>So I assumed that this is possible in C++ too.
> >
> >I still see an 'or'.
> >
> 
> you can of course replace the or with an and:
> 
> if (a == 1 && b == 1 && !(C != 1 && C != -1)) {...}
> 
> but i don't think that this is what you want ;-)

;-)

And now for the most compact version...

Andre'

Reply via email to