Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Прочее";
Текущий архив: 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.059 c
2-1274513044
timekiller
2010-05-22 11:24
2010.08.27
TWebBrowser, Просмотр кода, Access Violation


15-1266060403
GanibalLector
2010-02-13 14:26
2010.08.27
Транссиб


2-1269407580
fiascko
2010-03-24 08:13
2010.08.27
обработка сообщения из файла


15-1271942767
Mozart
2010-04-22 17:26
2010.08.27
построение октаэдра


2-1269717199
Studd
2010-03-27 22:13
2010.08.27
Алгоритм заполнения фигуры





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский