Rockwell-automation 1771-DB BASIC MODULE Manual de usuario Pagina 119

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 394
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 118
Chapter
Expressions, Variables and Operators
9
9 -9
Relational expressions involve the operators =, < >, >, >=, <, and <=.
In the BASIC module, you typically use relational operations to test a
condition.
The BASIC module relational operators return a result of 65535 (0FFFFH)
if the relational expression is true, and a result of 0 if the relation
expression is false. The result returns to the argument stack. Because of
this, it is possible to display the result of a relational expression.
>PRINT
1=0
0
>
PRINT 1>0
65535
>
PRINT A<>A
0
>
PRINT A=A
65535
You can chain relational expressions with the logical operators .AND.,
.OR., and .XOR. (page 9 -8). This makes it possible to test a complex
condition with one statement.
>10
IF (A>E).AND.(A>C).OR.(A>D)THEN...
Additionally, you can use the NOT operator (page 9 -11).
>10
IF NOT(A>E).AND.(A>C)THEN...
Important: When using logical operators to link relational expressions,
you must be sure operations are performed in the proper sequence.
When in doubt, use parentheses.
Relational Operators
Vista de pagina 118
1 2 ... 114 115 116 117 118 119 120 121 122 123 124 ... 393 394

Comentarios a estos manuales

Sin comentarios