🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
在比较运算符(>、<、>=、<=、==、===、!=、<>、!==)、赋值运算符(=)、数学运算符(+、-、*、/、%)、位运算符(&、|、^、~、>>、<<)、逻辑运算符(!、&&、||)、冒号(:)、问号(?)、字符串连接运算符(+)。 例如: /* These are all wrong. */ i=0; /* These are all right. */ i = 0; /* These are all wrong. */ if(i<7) ... /* These are all right. */ if (i < 7) ... /* These are all wrong. */ if ( (i < 7)&&(j > 8) ) ... /* These are all right. */ if ((i < 7) && (j > 8)) ... /* These are all wrong. */ do_stuff(i,"foo",b); /* These are all right. */ do_stuff(i, "foo", b); /* These are all wrong. */ for(i=0; i<size; i++) ... /* These are all right. */ for (i = 0;i < size;i++) ... /* These are all wrong. */ i=(j < size)?0:1; /* These are all rightg. */ i = (j < size) ? 0 : 1;