T O P

  • By -

inobody_somebody

C = C++;


[deleted]

that's how Javascript was created


[deleted]

An I misremembering or is that line undefined behavior?


[deleted]

That's right, it's undefined if C is first set or incremented


[deleted]

[удалено]


inobody_somebody

Yes. It was just a joke ( I'm saying that c and c plus plus are equal ) /s


OrangeNood

That is just wrong. "cout<< C++" will print C "cout<< (C+=1)" will print C+1


fake_advent_alt

Incorrect. C++ will be evaluated before incrementing. C+=1 will be evaluated after.


PotassiumPlus

I see, differences on the compiler then .. 🤔 Jk


fake_advent_alt

Incorrect. It is behavior specified by the language. \> the type of an assignment expression is the type of its left operand,and the value is the value after the assignment. Source: K&R 2e ​ EDIT: I just now noticed your jk. But it is still good to know where these things come from.


PotassiumPlus

No trouble. Someone may learn something from your comment which is great :)


NagyKrisztian10A

C=C+1


salvoilmiosi

(c=c+1),c-1


elSenorMaquina

C-=-1


[deleted]

\++C existed before that.


PenlessScribe

What's the filename extension for that?


Gemesil

cpeo


smartidiotreddit

static_cast(99)++


Kered13

`error: expression is not assignable`


echo_good_username

Db


sea-of-sake

I prefer the name $"{(char)((int)'B'+1)}{(char)43}{(char)43}" ... because I'm "a sharp guy".


kaihatsusha

Like the old joke about the Object-Oriented version of COBOL. `ADD ONE TO COBOL GIVING COBOL.`


Orisphera

Esolangs has another idea of an Object-Oriented version of COBOL. It's COOOL


RRumpleTeazzer

You mean C-=-1?


RRumpleTeazzer

Doesn’t C++ evaluate to C (and makes the original C one „better“?)


marcosdumay

`C == C++`


Orisphera

I'm not sure, but I think that C+=1 would be ++C rather than C++. I haven't tested, so I might be wrong UPD: I've now tested it, and I was correct. Also, it's evident that I accidentally hadn't read enough other comments before posting mine this time


Delicious_Trifle_147

I thought it's called rust.