我尝试使用Google搜索和Stack Overflow搜索,但它没有显示任何结果.我在开源库代码中看到了这个:
Notification notification = new Notification(icon, tickerText, when);
notification.defaults |= Notification.DEFAULT_SOUND;
notification.defaults |= Notification.DEFAULT_VIBRATE;
Run Code Online (Sandbox Code Playgroud)
"| ="(pipe equal operator)是什么意思?
例如,考虑以下代码
int main(int argc,char *argv[])
{
int *p,*q;
p = (int *)malloc(sizeof(int)*10);
q = (int *)malloc(sizeof(int)*10);
if (p == 0)
{
printf("ERROR: Out of memory\n");
return 1;
}
if (q == 0)
{
printf("ERROR: Out of memory\n");
exit(0);
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
什么返回0,返回1,退出(0)在上面的程序中执行.. exit(0)将退出总程序并且控件退出循环但是在返回0的情况下会发生什么,返回1,返回-1.