Форум: "Прочее";
Текущий архив: 2010.08.27;
Скачать: [xml.tar.bz2];
ВнизСогласитесь, что нехватает оператора типа a < x < b Найти похожие ветки
← →
han_malign (2010-05-17 18:39) [40]
> Логические выражения всегда вычисляются слева направо.
C Sequence Points
Between consecutive "sequence points" an object"s value can be modified only once by an expression. The C language defines the following sequence points:
- Left operand of the logical-AND operator (&&). The left operand of the logical-AND operator is completely evaluated and all side effects complete before continuing. If the left operand evaluates to false (0), the other operand is not evaluated.
- Left operand of the logical-OR operator (||). The left operand of the logical-OR operator is completely evaluated and all side effects complete before continuing. If the left operand evaluates to true (nonzero), the other operand is not evaluated.
- Left operand of the comma operator. The left operand of the comma operator is completely evaluated and all side effects complete before continuing. Both operands of the comma operator are always evaluated. Note that the comma operator in a function call does not guarantee an order of evaluation.
- Function-call operator. All arguments to a function are evaluated and all side effects complete before entry to the function. No order of evaluation among the arguments is specified.
- First operand of the conditional operator. The first operand of the conditional operator is completely evaluated and all side effects complete before continuing.
- The end of a full initialization expression (that is, an expression that is not part of another expression such as the end of an initialization in a declaration statement).
- The expression in an expression statement. Expression statements consist of an optional expression followed by a semicolon (;). The expression is evaluated for its side effects and there is a sequence point following this evaluation.
- The controlling expression in a selection (if or switch) statement. The expression is completely evaluated and all side effects complete before the code dependent on the selection is executed.
- The controlling expression of a while or do statement. The expression is completely evaluated and all side effects complete before any statements in the next iteration of the while or do loop are executed.
- Each of the three expressions of a for statement. The expressions are completely evaluated and all side effects complete before any statements in the next iteration of the for loop are executed.
- The expression in a return statement. The expression is completely evaluated and all side effects complete before control returns to the calling function.
"<" - это всего лишь бинарный оператор, а не логическое выражение...
← →
Inovet © (2010-05-17 19:44) [41]> [40] han_malign (17.05.10 18:39)
> "<" - это всего лишь бинарный оператор, а не логическое
> выражение
Ага, это я фигню сказал,:) потому как и само такое выражение полезность сомнительную имеет. А вообще интересно, может быть где-то такая конструкция полезна?
← →
Rouse_ © (2010-05-17 21:02) [42]
> Согласитесь, что нехватает оператора типа a < x < b
>
> AKE (14.05.10 22:13)
>
> в стандартных языках программирования?
Предлагаю написать об этом петицию непосредственно в эмбаркадеро, заодно и расскажешь что тебе ответят :)
← →
Чайник © (2010-05-18 13:03) [43]Microsoft Visual FoxPro Language Reference
BETWEEN( ) Function
Determines whether the value of an expression lies between the values of two other expressions of the same data type.
BETWEEN(eTestValue, eLowValue, eHighValue)
Return Values Logical or null value
← →
Inovet © (2010-05-18 13:41) [44]> [43] Чайник © (18.05.10 13:03)
Мало ли каких функций нет.
Страницы: 1 2 вся ветка
Форум: "Прочее";
Текущий архив: 2010.08.27;
Скачать: [xml.tar.bz2];
Память: 0.52 MB
Время: 0.116 c