Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Addition - fun - not what I thought
Message
De
06/07/2009 04:27:45
 
 
À
06/07/2009 03:18:12
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01410144
Message ID:
01410223
Vues:
41
>I think the documentation states that in these cases i is only evaluated once for the line. Given that the results will be as found.
>e.g i += ++i; // 3 not 4
>Best,
>Viv


Viv,

Guess I was looking for side effects

If I understand the definition of 'evaluated', then it will be evaluated twice in the example above since it's referenced twice on the right hand side
i += ++i becomes i = i + ++i
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform