Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
firusvg13768yHmm, what language is that? I suppose that right side should be hexadecimal negative 1. I've never encountered such notation nor I even tried (now for 25+ years) to use negative hex numbers.
-
@firusvg I think he meant that 0x-1 also equals -1, meaning that "x" is a random variable. 0 * x is always 0.
-
Oops, my bad. I thought you were ranting about some n00b's conditional statement where he would set a stupid condition like that which would not work.😁😁
-
spl020408y:-)
Actually it was a bit of code that had to output a hex number. So it turned the number into hex, and then put 0x on the front of it.
Worked OK until a -1 turned up!
-1 != 0x-1
undefined