究竟是什么运算符| = ??? [英] what exactly does the operator |= ???

查看:107
本文介绍了究竟是什么运算符| = ???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!!


我正在看C中的一些代码...并看到这个异国情调 operator | =。


第一次使用它,什么是exactky做的???


提前感谢。

Erick->

hello!!

I was looking at some code in C... and saw this "exotic" operator |=.

first time with it, what exactky does???

thanks in advance.
Erick->

推荐答案

Erick-said:
Erick-said:

你好!!


我正在看C中的一些代码...并看到这个异国情调 operator | =。


第一次使用它,whatky做什么???
hello!!

I was looking at some code in C... and saw this "exotic" operator |=.

first time with it, what exactky does???



见K& R2,第50页。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:正常服务将尽快恢复。请不要

调整你的电子邮件客户端。

See K&R2, page 50.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.


是的,那个页面是关于流量控制的,但我不认为这是

问题。不是流动,是分配。


这就是行:


* cmd | = newcmd;


问候

Erick->


Richard Heathfield写道:
yeah, that page is about flow control but I don′t think this is the
problem. Is not flow, is assigment.

this was the line:

*cmd |= newcmd;

greetings
Erick->


Richard Heathfield wrote:

埃里克说:
Erick-said:

你好!!


我正在查看C中的一些代码......看到这个异国情调 operator | =。


第一次使用它,whatky做什么???
hello!!

I was looking at some code in C... and saw this "exotic" operator |=.

first time with it, what exactky does???



见K& R2,第50页。


-

Richard Heathfield

Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk

电子邮件:正常服务将尽快恢复。请不要

调整您的电子邮件客户端。


See K&R2, page 50.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.


Erick-written:
Erick-wrote:

hello !!


我正在查看C中的一些代码...并且看到了这个异国情调的代码。 operator | =。


第一次使用它,whatky做什么???
hello!!

I was looking at some code in C... and saw this "exotic" operator |=.

first time with it, what exactky does???



左边的左值是包含 - 或者是'

右边的表达式,结果存储在左值。



The lvalue on the left is inclusive-OR''d with the expression on the
right, and the result is stored in the lvalue.



这篇关于究竟是什么运算符| = ???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆