C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: operateur c=cond?a:b

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French)
View previous topic :: View next topic  
Author Message
Loïc Joly
Guest





PostPosted: Sat Sep 13, 2003 9:45 am    Post subject: Re: operateur c=cond?a:b Reply with quote



Tom D. wrote:
Quote:
j'aimerais s'avoir ce que fait exactement cet opérateur.
de quelle code ce raproche-il le plus ?
c=(cond?a:b)

[Est-ce que a et b sont évalués, ou un seul des deux ?]

Un extrait du standard :

The first expression is implicitly converted to bool (clause 4).
It is evaluated and if it is true, the result of the conditional
expression is the value of the second expression,
otherwise that of the third expression. All side effects of the first
expression except for destruction of
temporaries (12.2) happen before the second or third expression is
evaluated. Only one of the second and
third expressions is evaluated.

En français : un seul est évalué.

--
Loïc


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ (French) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.