Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 18th, 2008, 09:35 PM
=?utf-8?Q?David_C=C3=B4me?=
Guest
 
Posts: n/a
Default Evaluation Order in a Condition statement

Hello.

Let A and B be 2 boolean expressions.
In the instruction if(A && B){/*..*/}, does the standard certify that A
will be evaluated first ?

Thanks a lot.
  #2  
Old March 18th, 2008, 09:45 PM
Christopher
Guest
 
Posts: n/a
Default Re: Evaluation Order in a Condition statement

On Mar 18, 3:32 pm, David Côme <davidc...@wanadoo.frwrote:
Quote:
Hello.
>
Let A and B be 2 boolean expressions.
In the instruction if(A && B){/*..*/}, does the standard certify that A
will be evaluated first ?
>
Thanks a lot.
left to right
  #3  
Old March 18th, 2008, 09:45 PM
Paavo Helde
Guest
 
Posts: n/a
Default Re: Evaluation Order in a Condition statement

=?utf-8?Q?David_C=C3=B4me?= <davidcome@wanadoo.frwrote in
news:op.t78bb5kyrttu86@debian:
Quote:
Hello.
>
Let A and B be 2 boolean expressions.
In the instruction if(A && B){/*..*/}, does the standard certify that A
will be evaluated first ?
Even more: if A yields false, B is not evaluated at all.
  #4  
Old March 19th, 2008, 05:45 AM
Alexander Dong Back Kim
Guest
 
Posts: n/a
Default Re: Evaluation Order in a Condition statement

On Mar 19, 7:40 am, Christopher <cp...@austin.rr.comwrote:
Quote:
On Mar 18, 3:32 pm, David Côme <davidc...@wanadoo.frwrote:
>
Quote:
Hello.
>
Quote:
Let A and B be 2 boolean expressions.
In the instruction if(A && B){/*..*/}, does the standard certify that A
will be evaluated first ?
>
Quote:
Thanks a lot.
>
left to right
This is absolutely right! Lazy evaluation!

Cheers,
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles