c - 何时在 c 中使用 True not 或等等来代替 &&、||、!=、= 等运算符
问题描述
我的意思是我注意到实际的单词确实存在于 C 中,并且在我编写它们时会亮起,但是我如何使用它们而不是像==
!=
&&
||
.语法只是为了解释我的意思):
if not(stuff==3 and otherStuff==5)
printf("something");
else if(statement==false)
printf("some else");
解决方案
Stack Overflow 上的新荧光笔非常糟糕。但是您也可以在 C 中使用and
andnot
来满足您的需要#include <iso646.h>
。
不过,它们不是关键字,而是宏。
推荐阅读
- java - 在更改数组的值时遇到非法的表达式开始错误
- string - golang:关于字符串连接的具体问题
- python - 如何使用 Selenium 从 LinkedIn 公司页面中抓取员工人数?
- r - 为交互式闪亮小部件参数制作反应变量
- ios - 回调在没有初始化程序的类中无法正常工作?
- java - Spring Boot banner.gif 没有动画
- c++ - consteval 是否允许在函数参数上使用 static_assert?
- python - 在 pytest-ing 时禁用每个测试“点”
- ruby-on-rails - Ruby on Rails:干模式干验证不验证存在
- memgraphdb - 无法为 memgraphdb 安装 pymgclient