Metrologic IS1000 Series Guia do Utilizador Página 24

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 198
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 23
18
CipherLab BASIC Compiler
User's Guide
4.3.2 Arithmetic Operator
The arithmetic operators are:
Operator Operation Sample Expression
^ Exponentiation A% = 9^3
- Negation (unary) A% = -B%
* Multiplication A! = B! * C!
\ Division (integer) A% = B! \ C!
/ Division (real) A! = B! / C!
+ Addition A% = B% + C%
- Subtraction A% = B% - C%
MOD Modulo arithmetic A% = B% MOD C%
4.3.3 Relational Operator
Relational operators are used to compare two values. The result of the comparison is either
"True" or "False". This result may then be used to make a decision regarding program flow.
Operator Operation Sample Expression
= Equality A% = B%
<> Inequality A% <> B%
>< Inequality A! >< B!
> Greater than A% > B!
< Less than A! < B!
>= Greater than or equal to A% >= B%
<= Less than or equal to A% <= B%
4.3.4 Logical Operator
Logical operators perform tests on multiple relations and Boolean operations. The logical
operator returns a bit-wise result which is either "True" (not zero) or "False" (zero). In an
expression, logical operations are performed after arithmetic and relational operations.
Operator Operation Sample Expression
NOT Logical negation IF NOT (A% = B%)
AND Logical and IF (A% = B%) AND (C% = D%)
OR Inclusive or IF (A% = B%) OR (C% = D%)
Vista de página 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 197 198

Comentários a estes Manuais

Sem comentários