Matrix Elements VB-800 Instrukcja Użytkownika Strona 156

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 155
148 Appendix A6 OxGauss Language Reference
will always be executed. For example, in the expression func1() .&& func2() the
second function is called, regardless of the return value of func1().
A6.8.11 Logical dot-OR expressions
The dot-or operator is written as .|| or .or. It returns 1 if either of its operands com-
pares unequal to 0, 0 otherwise. Both operands must have arithmetic type. Handling
of matrix-type is as for dot-relational operators: if one or both operands is a matrix,
the result is a matrix of zeros and ones. Unlike the non-dotted version, both operands
will always be executed. For example, in the expression func1() .|| func2() the
second function is called, regardless of the return value of func1().
A6.8.12 Logical dot-XOR expressions
The dot-or operator is written as .xor. It returns 1 if one and only one of the operands
compares unequal to 0, 0 otherwise. Both operands must have arithmetic type. Han-
dling of matrix-type is as for dot-relational operators: if one or both operands is a
matrix, the expression is evaluated for each element, and the result is a matrix of zeros
and ones.
A6.8.13 Logical dot-EQV expressions
The dot-eqv operator is written as .eqv. It returns 1 if both operands are unequal to 0 or
if both are equal to 0, 0 otherwise. Both operands must have arithmetic type. Handling
of matrix-type is as for dot-relational operators: if one or both operands is a matrix, the
expression is evaluated for each element, and the result is a matrix of zeros and ones.
A6.8.14 Relational expressions
The relational operators are <, <=, >, >=, ==, /=, standing for ‘less’, ‘less or equal’,
‘greater’, ‘greater or equal’, ‘is equal to’, ‘is not equal to’. They yield 0 if the specified
relation is false, and 1 if it is true.
The type of the result is always an integer, see Table A6.4. If both operands are
a matrix, the return value is true if the relation holds for each element. If one of the
operands is of scalar-type, and the other of matrix-type, each element in the matrix is
compared to the scalar, and the result is true if each comparison is true.
String comparison is case sensitive.
A6.8.15 Logical-NOT expressions
The logical negation operator not precedes the operand which must be scalar and have
arithmetic type. The result is 1 if the operand is equal to 0 and 0 otherwise.
Przeglądanie stron 155
1 2 ... 151 152 153 154 155 156 157 158 159 160 161 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag