* / %
Multiply, divide and modulo.
+ -
Addition and subtraction.
< >=
Relational operators.
>=
Relational operator.
<=
Relational operator.
<>
Relational operator.
|
Bit-wise OR operator.
&
Bit-wise AND operator.
The expressions are evaluated left to right except with exponentiation which evaluates right to
left.
Unary plus and minus attach a sign to a number. For example -FirstNumber is -1 if FirstNumber
is 1, 7 if FirstNumber is -7, etc.
Exponentiation raises a number to a power.
For example 3^4
is 81.
Multiply ( * ) and divide ( / ) are the normal arithmetic operations.
The modulo operator calculates
the remainder after division. For example 27% 5
is 2.
Expressions involving the relational operators evaluate to 1.0 if TRUE or 0.0 if FALSE.
The AND (
&
) and OR (
|
) operators convert the decimal numbers to integers before evaluation.
Therefore the expressions on either side of these operators must resolve to values in the range
0 to 65535. For example:
211 & 112 = 80
(211.53) & 112 = 80
211 | 112 = 243
2.7
Control Structures
The simple progress from line to line of a program is very limited. In order to give the language
real power we need commands which allow us to change the order of operation according to
tests performed on variables.
In addition, the structure of the program can be simplified, the number of variables needed can
be reduced and parts of the program can be made more portable by using subroutines.
In this sense, portable means that useful sequences of instructions can be copied and pasted
into new programs.
Finally, we need to be able to repeat sequences of operations for whole sets of variables or for
a pre-defined number of times.
2.7.1
Tests and Branches
The basic test is the structure
:
If expression Then command
MAN0179
Page 2.6
Zetasizer 1000/2000/3000/4000/5000/4700
Artisan Scientific - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisan-scientific.com
Содержание Zetasizer Series
Страница 11: ...Artisan Scientific Quality Instrumentation Guaranteed 888 88 SOURCE www artisan scientific com...
Страница 16: ...Artisan Scientific Quality Instrumentation Guaranteed 888 88 SOURCE www artisan scientific com...
Страница 34: ...Artisan Scientific Quality Instrumentation Guaranteed 888 88 SOURCE www artisan scientific com...
Страница 38: ...Artisan Scientific Quality Instrumentation Guaranteed 888 88 SOURCE www artisan scientific com...
Страница 116: ...Artisan Scientific Quality Instrumentation Guaranteed 888 88 SOURCE www artisan scientific com...