x =!x是什么意思?

Vin*_*982 -3 c ghostscript mupdf

虽然readinf MuPDF遇到了源代码行

x = !x;
Run Code Online (Sandbox Code Playgroud)

想知道上面的代码是做什么的?

编译时也会出错

assuming signed overflow does not occur when simplifying 
condition to constant [-Werror=strict-overflow ]
Run Code Online (Sandbox Code Playgroud)

jua*_*nza 5

!x将评估为01,取决于的价值x.

  • 如果x0,则评估为1.
  • 否则,它评估为0.