Tag: 语言理论

为什么在curl的支架后不需要分号?

我知道在声明之后需要一个分号(我说的是Java,C ++和类似的语言),但在curl的括号之后不需要。 为什么这样? if (a > b) printf(“hello!”); // semicolon is mandatory if (a > b) { printf(“hello!”); } // semicolon is not required 是什么原因? 我的意思是,这背后的理论是什么?