Rockwell-automation 1771-DB Basic Module User Manual - Series A Manual de usuario Pagina 80

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 79
Operating Functions
Chapter 5
5–43
The BASIC Module contains a complete set of arithmetic and logical
operators. We divide the operators into two groups, dual operand (dyadic)
operators and single operand (unary) operators.
The general form of all dual operand instructions is:
(expr) OP (expr), where OP is one of the following operators.
+ Addition Operator
Example: PRINT 3+2
5
/ Division Operator
Example: PRINT 100/5
20
** Exponentiation Operator
The Exponentiation Operator raises the first expression to the power of
the second expression. The maximum power to which you raise a
number is 255.
Example: PRINT 2**3
8
* Multiplication Operator
Example: PRINT 3*3
9
– Subtraction Operator
Example: PRINT 9–6
3
.AND. Logical AND Operator
Example: PRINT 3.AND.2
2
.OR. Logical OR Operator
Example: PRINT 1.OR.4
5.
.XOR. Logical EXCLUSIVE OR operator
Example: PRINT 7.XOR.6
1
5.5
Description of Arithmetic,
and Logical Operators and
Expressions
5.5.1
Dual Operand (dyadic)
Operators
Vista de pagina 79
1 2 ... 75 76 77 78 79 80 81 82 83 84 85 ... 166 167

Comentarios a estos manuales

Sin comentarios