全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Side effect, sequencing?

又称: side effect · sequencing

Definition 2.7 University Computer Science — Year 1 · 第 2 章 — C: Types, Operators and Control Flow

A side effect of an expression is a change of state that its evaluation causes: storing into a variable (=, ++, +=), writing to a file. C fixes the order of side effects only at sequence points: the end of a full expression, the &&, || and comma operators, and a function call. Between two of them, two side effects on the same object, or a side effect and an unrelated read of the same object, make the behaviour undefined.

在原文中阅读 →