Teledyne-lecroy Protocol Analyzers File-Based Decoding User Manual Manual de usuario Pagina 16

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 82
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 15
Chapter 4: Operators File-based Decoding User Manual
10 LeCroy Corporation
When operators of equal precedence occur in an expression, the operands are evaluated
according to the associativity of the operators. This means that if an operator's
associativity is left to right, then the operations is done starting from the left side of the
expression. So, the expression
4 + 9 - 6 + 5
would evaluate to 12. However, if the associative
operator is used to group a part or parts
of the expression, those parts are evaluated first. Therefore,
( 4 + 9 ) - ( 6 + 5 )
has a value of 2.
In Table 4.1, Operator Precedence and Associativity, the operators are listed in order of
precedence, from highest to lowest. Operators on
the same line have equal precedence,
and their associativity is shown in the second column.
Operator Symbol Associativity
++ --
Right to left
[] ()
Left to right
~ ! sizeof head tail first next more
last prev
Right to left
* / %
Left to right
+ -
Left to right
<< >>
Left to right
< > <= >=
Left to right
== !=
Left to right
&
Left to right
^
Left to right
|
Left to right
&&
Left to right
||
Left to right
= += -= *= /= %= >>= <<= &= ^= |=
Right to left
Table 4.1 Operator Precedence and Associativity
Vista de pagina 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 81 82

Comentarios a estos manuales

Sin comentarios