OLIVIER CAYRON wrote:
> Selon les specs : 
> 15.6.1 Evaluate Left-Hand Operand First
> The left-hand operand of a binary operator appears to be
> fully evaluated before any part of the right-hand operand
> is evaluated. For example, if the left-hand operand contains
> an assignment to a variable and the right-hand operand contains
> a reference to that same variable, then the value produced by
> the reference will reflect the fact that the assignment occurred
> first
> Dans ton cas, on peut traduire par 
> taille = ( taille = ( taille + 1 ) )
> La partie de gauche �tant toujours �valu�e en premier,
> l'affectation se fait avant �valuation de + 1

Merci pour la r�f�rence de la sp�cification !
Mais je me demande si l'on a pas plutot :
temp = taille
taille++
taille = temp
et du coup la valeur incr�ment�e est �cras�e.

Merci, yann.

-- 
  / Yann SECQ            Equipe SMAC           [EMAIL PROTECTED] \
| Multi-Agent Systems Modeling & Agent Oriented Programming |
  \ http://www.lifl.fr/SMAC        http://www.lifl.fr/~secq /

Répondre à