Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > "+=" operator, comments appreciated, thanks!

Reply
Thread Tools

"+=" operator, comments appreciated, thanks!

 
 
almurph@altavista.com
Guest
Posts: n/a
 
      03-14-2009
Hi,

Just wondering is a difference between the "+=" operator between C
and C#?


I ask as I have reverse engineered some C code to C# and am receiving
some differing results. I have traced it down to a line involving a
"+=" operator. The C clode uses floats but I am using double, but this
should not make a difference right?

Just wondering if anyone has any comments or suggestions or user
experiences that thay would like to share.

Thanks,
Al.
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      03-14-2009
"Malcolm McLean" <(E-Mail Removed)> writes:

> <(E-Mail Removed)> wrote in message news:
>> Just wondering is a difference between the "+=" operator between C
>> and C#?
>>
>>
>> I ask as I have reverse engineered some C code to C# and am receiving
>> some differing results. I have traced it down to a line involving a
>> "+=" operator. The C clode uses floats but I am using double, but this
>> should not make a difference right?


You happen to have a case where I would have thought there would not be
much difference, but you really need to ask in a C# group. When you
do (or if you post similar questions here) it really helps to have
actual code (especially including the types of the various objects)
and what you see as going wrong.

>> Just wondering if anyone has any comments or suggestions or user
>> experiences that thay would like to share.
>>

> C# += means the same as C +=.


I don't think so. Even with the simplest arithmetic types for x and
y, x += y does not mean the same in the two languages (but I am not an
expert in C#). Of course, if x and y are not plain types the effect
is wildly different.

--
Ben.
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      03-14-2009
"(E-Mail Removed)" <(E-Mail Removed)> writes:
> Just wondering is a difference between the "+=" operator between C
> and C#?


No idea. Why would you ask a C# question in a C newsgroup?

If you have specific questions about C's "+=" operator, this is the
place to ask. If you want to know how C's "+=" operator works in
general, a good C reference or the C standard would be better. If you
want to know something about C#, you're in the wrong place.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
J. J. Farrell
Guest
Posts: n/a
 
      03-14-2009
Keith Thompson wrote:
> "(E-Mail Removed)" <(E-Mail Removed)> writes:
>> Just wondering is a difference between the "+=" operator between C
>> and C#?

>
> No idea. Why would you ask a C# question in a C newsgroup?


For the same reason that he would ask a C question in a C# group.

It isn't a "C#" question, it's a "C and C#" question. This isn't the
ideal place for it, but nor is a C# group.

Some have suggested that he's more likely to find people who know both C
and C# in a C# group than a C group; I don't know if that's true, but
from evidence to date there don't seem to be many here who know both.
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      03-15-2009
"(E-Mail Removed)" wrote:
>
> Just wondering is a difference between the "+=" operator between C
> and C#?


We have no idea. This is c.l.c, and we discuss the C langage. C#
is something else.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      03-15-2009
In article <ZZXul.261$(E-Mail Removed)>,
Golden California Girls <(E-Mail Removed)> wrote:
>CBFalconer wrote:
>> "(E-Mail Removed)" wrote:
>>> Just wondering is a difference between the "+=" operator between C
>>> and C#?

>>
>> We have no idea. This is c.l.c, and we discuss the C langage. C#
>> is something else.

>
>CBF is not authorized to speak for me.


These days, I don't think CBF is authorized to speak for CBF.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A program to replace all JS comments with JSP comments in jsp files tungchau81@yahoo.com Javascript 4 06-03-2006 02:00 PM
A program to replace all JS comments with JSP comments in jsp files tungchau81@yahoo.com Java 0 06-02-2006 06:35 AM
Comments format: comments extending over multi-line Monk C Programming 10 04-20-2005 05:09 PM
Firefox comments and questions? Noozer Firefox 3 04-21-2004 08:29 PM
Firefox 0.8 Comments Ol' Duffer Firefox 5 02-23-2004 01:54 AM



Advertisments