Is anybody using the named boolean operators?(有人使用命名的布尔运算符吗?)
问题描述
还是我们都坚持我们教过的&&, ||, !"怎么办?
Or are we all sticking to our taught "&&, ||, !" way?
对于我们为什么应该使用其中一个有什么想法吗?
Any thoughts in why we should use one or the other?
我只是想知道,因为有几个答案表明代码应该尽可能自然,但我没有看到很多带有and,or,not"的代码,而这更自然.
I'm just wondering because several answers state thate code should be as natural as possible, but I haven't seen a lot of code with "and, or, not" while this is more natural.
推荐答案
以前不支持这些.即使是现在,您也需要对某些编译器进行特殊切换以启用这些关键字.这可能是因为旧代码库可能有一些功能 ||名为and"or"not"的变量.
Those were not supported in the old days. And even now you need to give a special switch to some compilers to enable these keywords. That's probably because old code base may have had some functions || variables named "and" "or" "not".
这篇关于有人使用命名的布尔运算符吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:有人使用命名的布尔运算符吗?


基础教程推荐
- 这个宏可以转换成函数吗? 2022-01-01
- 我有静态或动态 boost 库吗? 2021-01-01
- 常量变量在标题中不起作用 2021-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- C++结构和函数声明。为什么它不能编译? 2022-11-07