Главная страница
    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.116 c
15-1267870116
AlexDan
2010-03-06 13:08
2010.08.27
php и мат. функции..


15-1268775005
Юрий
2010-03-17 00:30
2010.08.27
С днем рождения ! 17 марта 2010 среда


2-1268835906
user99834
2010-03-17 17:25
2010.08.27
Преобразовать BMP в JPEG, сжать и записать в TMemoryStream


2-1267877887
girichev
2010-03-06 15:18
2010.08.27
Загрузка изображения из Resources


2-1268318095
rust-02
2010-03-11 17:34
2010.08.27
Нужно считать текстовой файл до определённых слов. delphi





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
Английский Французский Немецкий Итальянский Португальский Русский Испанский