Rockwell-automation 2098-IPD-xxx Ultra5000 C Programming using the Mot Manual do Utilizador Página 33

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 114
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 32
Publication 2098-PM001E-EN-P — July 2002
Programming Motion Control in C 1-21
Relational and Logical
Operators
The relational operators (<, <=, >=, >) make comparisons that test
expressions. They have lower precedence than arithmetic operators,
but higher precedence than the equality operators (==, !=). The logical
operators (&& and ||) have a lower precedence than either the
relational operators and equality operators.
Each of these operators (except the unary !) compares the value to the
left of the operator to the value at its right.
The table below lists the precedence and describes the functions of
these operators.
The numeric value of relational and logical expressions is 1 if the
relation is true, and 0 if the relation is false. The unary negation
operator ! converts a non-zero operand into 0 and a zero operand into
1.
Conditional Expressions
Conditional expressions are a compact way of writing if-else
statements using?”, the ternary operator. (If-Else is introduced on
page 1-24.)
The operator requires three operands, each of which is an expression,
and the condition is evaluated from left to right.
expressionl ? expression2 : expression3
The value of the whole expression equals the value of expression2 if
expression1 is true, else it equals the value of expression3.
Operator: Precedence: Function: Limitations:
< 1 Is less than
<= Is less than or equal to Rounding may cause
errors with floating
point numbers.
(e.g., 3 * 1/3 is 1, but 3
* 0.333333 is
0.999999).
>= Is greater than or equal to
> Is greater than
== 2 Is equal to
!= Is not equal to
&& 3 And
|| 4 Or
!
(unary form)
5Not
Vista de página 32
1 2 ... 28 29 30 31 32 33 34 35 36 37 38 ... 113 114

Comentários a estes Manuais

Sem comentários

COBY electronic Digitální fotorámečky uživatelské příručky

Seznam produktů COBY electronic Digitální fotorámečky obsahuje 9 uživatelské příručky pro 9 modelů. Všechny uživatelské příručky pdf jsou k dispozici ke stažení nebo prohlížení online.

Klepnutím na abecedu níže přejděte na úplný seznam modelů začínajících tímto písmenem

Modely Typ Dokumentu
907-DP74-0S01-00R
Uživatelský manuál   COBY electronic 907-DP74-0S01-00R User's Manual, 1 stránky
DP-5588
Uživatelský manuál   COBY electronic DP-5588 User's Manual, 36 stránky
DP1412
Uživatelský manuál   COBY electronic DP1412 User's Manual, 1 stránky
DP350
Uživatelský manuál   COBY electronic DP350 User's Manual, 1 stránky
DP500
Uživatelský manuál   COBY electronic DP500 User's Manual, 1 stránky
DP5088
Uživatelský manuál   COBY electronic DP5088 User's Manual, 1 stránky
DP702
Uživatelský manuál   COBY electronic DP702 User's Manual, 1 stránky
DP710
Uživatelský manuál   COBY electronic DP710 User's Manual, 1 stránky
DP848-128
Uživatelský manuál   COBY electronic DP848-128 User's Manual, 1 stránky