交叉逻辑主要造成逻辑模糊.
例子
- 下列例子是将file1的内容写入到file2中.
坏味道伪代码
- 交叉的逻辑导致理解不清晰
`
cpp
File file2;
File file1;
Content c = file1.read();
file2.write(c);
file1.close();
file2.close();
## 好味道伪代码
* 步骤分明容易理解
```cpp
File file1;
Content c = file1.read();
file1.close();
File file2;
file2.write(c);
file2.close();