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

  • 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 114
Chapter
Expressions, Variables and Operators
9
9 -5
The BASIC module contains a complete set of two-operand and
one-operand arithmetic operators.
The general form of all two-operand instructions is:
(expr) OP (expr), where OP is one of these arithmetic operators.
Add ( + )
Use the addition operator to add the first and the second expressions
together.
>PRINT
3+2
Result: 5
Divide ( / )
Use the division operator to divide the first expression by the second
expression.
>PRINT
100/5
Result: 20
Exponentiation ( **)
Use the exponentiation operator to raise the first expression to the power of
the second expression. The maximum power to which you can raise a
number is 255. (See also EXP page 9 -13)
>PRINT
2**3
Result: 8
Multiply ( * )
Use the multiplication operator to multiply the first expression by the
second expression.
>PRINT
3*3
Result: 9
Subtract ( – )
Use the subtraction operator to subtract the second expression from the
first expression.
>PRINT
9-6
Result: 3
Arithmetic Operators
Vista de pagina 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 393 394

Comentarios a estos manuales

Sin comentarios