В C99 - прописано
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено Yuriy 10 декабря 2004 г. 15:20
В ответ на: нету справочника под рукой. Если есть выражение if (a && b), то каков порядок вычисления истинности а и b ? Если одно из них ложно, то будет ли вычисляться второе ? отправлено DASM 10 декабря 2004 г. 14:51

6.5.13 Logical AND operator
...
4 Unlike the bitwise binary & operator, the && operator guarantees left-to-right evaluation; there is a sequence point after the evaluation of the first operand. If the first operand compares equal to 0, the second operand is not evaluated.
...
6.5.14 Logical OR operator
...
4 Unlike the bitwise | operator, the || operator guarantees left-to-right evaluation; there is a sequence point after the evaluation of the first operand. If the first operand compares unequal to 0, the second operand is not evaluated.
...

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru