From: varobert AT colba DOT net Message-Id: <3.0.32.19990731233613.007b0340@mail.colba.net> X-Sender: varobert AT mail DOT colba DOT net X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Sat, 31 Jul 1999 23:36:14 -0400 To: djgpp AT delorie DOT com Subject: Re: basic c question Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp AT delorie DOT com It's a required C (C++ ?) behaviour. In an and statement, the first condition is evaluated, and the second one only if the first is true. The same hold true for OR: if the first expression is true, it won't bother to evaluate all the others, if not, it'll go one by one from left to rigth. At 01:18 AM 7/9/98 +0300, you wrote: >let's say we ahve the following expresion: >if((a)&&(b)) {} > >the compiler evaluates a or b first? >and does it optimize the evaluation, so if the first of them in 0, don't >bother about the other one?? (0&&1==0) > > > - GodOfWar Computers are getting faster, smaller and cheaper with time. Does that mean that Microsoft invented time travel ?