473,804 Members | 4,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what exactly does the operator |= ???

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->

Nov 16 '06
37 2005
Keith Thompson said:
Richard Heathfield <in*****@invali d.invalidwrites :
>Erick-said:
>>do you want to see this book?? with the page NUMBER 50 with the first
line: "Chapter 3 - Control Flow" ???

If that is the case, then it isn't the book I suggested you consult, i.e.
K&R2. Clearly, if you consult some other book, my page reference will not
be valid, but it is certainly valid for the book I suggested.

Are there different printings of K&R2 with different page numbering?
No.
There have been two major editions of K&R (Kernighan & Ritchie, _The C
Programming Language_). The first edition is now mostly of historical
interest. The second edition describes the language standardized by
the 1989 ANSI standard and the 1990 ISO standard. (There are no plans
for a new edition covering the 1999 standard.)
There was also an interim edition, based on the ANSI C draft - and it turned
out to be identical to the second edition.

Even the hardback version (which I also have) has identical page-numbering.

--
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.
Nov 17 '06 #21
On Fri, 17 Nov 2006 20:35:02 GMT, in comp.lang.c , Keith Thompson
<ks***@mib.orgw rote:
>Richard Heathfield <in*****@invali d.invalidwrites :
>Erick-said:
>>do you want to see this book?? with the page NUMBER 50 with the first
line: "Chapter 3 - Control Flow" ???

If that is the case, then it isn't the book I suggested you consult, i.e.
K&R2. Clearly, if you consult some other book, my page reference will not
be valid, but it is certainly valid for the book I suggested.

Are there different printings of K&R2 with different page numbering?
He may be looking at a non-English impression, which would most likely
have different page numbering.
>Erick, if you're looking at the first edition, you should get a copy
of the second edition.
Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 17 '06 #22
On Fri, 17 Nov 2006 20:57:31 +0000, in comp.lang.c , Richard
Heathfield <in*****@invali d.invalidwrote:
>Keith Thompson said:
>Are there different printings of K&R2 with different page numbering?

No.
Absurd claim.

One might reasonably expect foreign language copies to have different
page numbering, and indeed a UK pressing might well be different to a
US one, or a reprint on smaller pagesize, or...
>Even the hardback version (which I also have) has identical page-numbering.
Perhaps, but as with the output of compilers, empirical evidence of
your particular environment is not a general proof.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 17 '06 #23
Op Fri, 17 Nov 2006 22:53:19 +0000 schreef Mark McIntyre:

<snip>
Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.
That's on the middle of page 53.
Page 50 begins with the header '2.10 Assignment Operators...' as I wrote
earlier.
I have the paperback version of 1988, ISBN 0-13-110362-8.
Bought for nearly EUR 50 in 2003.
--
Coos
Nov 17 '06 #24
Mark McIntyre <ma**********@s pamcop.netwrite s:
On Fri, 17 Nov 2006 20:35:02 GMT, in comp.lang.c , Keith Thompson
<ks***@mib.orgw rote:
>>Richard Heathfield <in*****@invali d.invalidwrites :
>>Erick-said:
do you want to see this book?? with the page NUMBER 50 with the first
line: "Chapter 3 - Control Flow" ???

If that is the case, then it isn't the book I suggested you consult, i.e.
K&R2. Clearly, if you consult some other book, my page reference will not
be valid, but it is certainly valid for the book I suggested.

Are there different printings of K&R2 with different page numbering?

He may be looking at a non-English impression, which would most likely
have different page numbering.
>>Erick, if you're looking at the first edition, you should get a copy
of the second edition.

Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.
It's the same in my copy of K&R1. That's the last page of the section
on Precedence and Order of Evaluation. Chapter 3, on Control Flow,
starts on page 51.

In my copy of K&R2, page 50 is the first page of the section on
Assignment Operators and expressions; chapter 3, on Control Flow,
starts on page 55.

Either Erick has made a mistake (hey, it happens), or he has some
other edition.

There are a multitude of translations into languages other than
English; see <http://cm.bell-labs.com/cm/cs/cbook/>. That page
mentions that many of the errata have been corrected in recent
printings; it's plausible that some of those corrections might have
caused page shifts (though probably not from 50 to 55, assuming we're
talking about K&R2).

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 17 '06 #25
Mark McIntyre said:
On Fri, 17 Nov 2006 20:35:02 GMT, in comp.lang.c , Keith Thompson
<ks***@mib.orgw rote:
>>Richard Heathfield <in*****@invali d.invalidwrites :
>>Erick-said:
do you want to see this book?? with the page NUMBER 50 with the first
line: "Chapter 3 - Control Flow" ???

If that is the case, then it isn't the book I suggested you consult,
i.e. K&R2. Clearly, if you consult some other book, my page reference
will not be valid, but it is certainly valid for the book I suggested.

Are there different printings of K&R2 with different page numbering?

He may be looking at a non-English impression, which would most likely
have different page numbering.
That is entirely possible. If it is in fact the case, then I owe the OP an
apology.
>>Erick, if you're looking at the first edition, you should get a copy
of the second edition.

Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.
And in any case, I specified K&R2, not K&R.

--
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.
Nov 17 '06 #26
Mark McIntyre said:
On Fri, 17 Nov 2006 20:57:31 +0000, in comp.lang.c , Richard
Heathfield <in*****@invali d.invalidwrote:
>>Keith Thompson said:
>>Are there different printings of K&R2 with different page numbering?

No.

Absurd claim.
I thought I was supposed to be in your killfile.
One might reasonably expect foreign language copies to have different
page numbering, and indeed a UK pressing might well be different to a
US one, or a reprint on smaller pagesize, or...
Yes, it's true that I hadn't considered that possibility.
>>Even the hardback version (which I also have) has identical
page-numbering.

Perhaps, but as with the output of compilers, empirical evidence of
your particular environment is not a general proof.
Do you have a counter-example in English?

--
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.
Nov 17 '06 #27

Coos Haak wrote:
Op Fri, 17 Nov 2006 22:53:19 +0000 schreef Mark McIntyre:

<snip>
Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.

That's on the middle of page 53.
Page 50 begins with the header '2.10 Assignment Operators...' as I wrote
earlier. I have the paperback version of 1988, ISBN 0-13-110362-8.
Bought for nearly EUR 50 in 2003.
You're talking about K&R2. Mark was talking about K&R, since the most
likely cause of the confusion was that the OP looked at K&R rather than
the K&R2 which Richard specified. It looks like the OP's printing
differs from both the common standard editions.

Nov 18 '06 #28
On Fri, 17 Nov 2006 23:41:24 +0000, in comp.lang.c , Richard
Heathfield <in*****@invali d.invalidwrote:
>Mark McIntyre said:
>On Fri, 17 Nov 2006 20:57:31 +0000, in comp.lang.c , Richard
Heathfield <in*****@invali d.invalidwrote:
>>>Even the hardback version (which I also have) has identical
page-numbering.

Perhaps, but as with the output of compilers, empirical evidence of
your particular environment is not a general proof.

Do you have a counter-example in English?
Thats irrelevant, and you know it as well as I do. And for what its
worth the OP had a book with different page numbering to you so we
already have an example (*)

I'm sorry Richard, but you're being foolish, and you know it.
(*) a petty minded person would at this point claim that the OP must
have been referring to a different book. Naturally, the petty-minded
person cannot possibly be mistaken, clearly only everyone else can be
wrong.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 18 '06 #29
On Sat, 18 Nov 2006 00:34:16 +0100, in comp.lang.c , Coos Haak
<ch*****@hccnet .nlwrote:
>Op Fri, 17 Nov 2006 22:53:19 +0000 schreef Mark McIntyre:

<snip>
>Page 50 of K&R (1978) starts with the words "similarly, the order in
which..." and talks about function argument evaluation order.

That's on the middle of page 53.
Page 50 begins with the header '2.10 Assignment Operators...' as I wrote
earlier.
I have the paperback version of 1988, ISBN 0-13-110362-8.
Bought for nearly EUR 50 in 2003.
Thats K&R2. Note that I said K&R(1978)

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 18 '06 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

226
12735
by: Stephen C. Waterbury | last post by:
This seems like it ought to work, according to the description of reduce(), but it doesn't. Is this a bug, or am I missing something? Python 2.3.2 (#1, Oct 20 2003, 01:04:35) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> d1 = {'a':1} >>> d2 = {'b':2} >>> d3 = {'c':3}
70
8919
by: Roy Yao | last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ? According to my analysis, operator sizeof, (type) and * have the same precedence, and they combine from right to left. Then this expression should equal to "sizeof( (int)(*p) )", but the compiler does NOT think so. Why? Can anyone help me? Thanks. Best regards. Roy
2
1375
by: Alexander Stippler | last post by:
Hi, I've got a question concerning iterators. I'm writing some container class and iterators upon it. I have to have typedef typex pointer; typedef typey reference; to be standard conforming. But what semantic requirements does the standard expose on type typey (and typex). If I define reference operator*(), does the object I return have to be (non-const) referencable or can I return
12
3307
by: Steven T. Hatton | last post by:
This is something I've been looking at because it is central to a currently broken part of the KDevelop new application wizard. I'm not complaining about it being broken, It's a CVS images. Such things happen. The whole subsystem is going through radical changes. I don't really want to say what I think of the code just yet. That would influence the opinions of others, and I really want to know how other people view these things,...
2
3511
by: Steven T. Hatton | last post by:
I'm still not completely sure what's going on with C++ I/O regarding the extractors and inserters. The following document seems a bit inconsistent: http://gcc.gnu.org/onlinedocs/libstdc++/27_io/howto.html#1 Copying a file: WRONG WAY: #include <fstream> std::ifstream IN ("input_file"); std::ofstream OUT ("output_file");
17
3505
by: Anoob | last post by:
Can we consider () unary operator when calling a function, in exps eq. f(), ( 1 + 2). But when we call function f( 10 ) it is a binary operator. Even if we pass f( 10, 20) as we are using , operator there one operand will be there for ()? And Unary operators like !, +, -, ~, ... are said to be having associativity right to left which means that we can write, (but not allowed) 1. 2! 2. !2
24
2969
by: Romeo Colacitti | last post by:
Hi, Does anyone here have a strong understanding for the meanings of the terms "lvalue" and "rvalue" as it pertains to C, objects, and different contexts? If so please share. I've been reading several old posts/threads on the subject, and they never end with a conclusion (people keep correcting each other and disagreeing).
15
1855
by: Pranav | last post by:
class just{ public : int x; just(){ x=1234; } just(int i){ x = i;} ~just(){ cout << " Here We Are\n" ;} }; int main() {
2
1791
by: Peng Yu | last post by:
Hi, In the following code, the 'copy' member function works. But the '=' operator does not work. Can somebody let me know why a member function is different from an operator. Thanks, Peng #include <iostream>
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.