minus-squarePerhyte@lemmy.worldtoProgrammer Humor@lemmy.ml•Python is great, but stuff like this just drives me up the walllinkfedilinkEnglisharrow-up1·7 months ago And MATLAB appears to produce 51, wtf idk The numeric value of the ‘1’ character (the ASCII code / Unicode code point representing the digit) is 49. Add 2 to it and you get 51. C (and several related languages) will do the same if you evaluate '1' + 2. linkfedilink
The numeric value of the ‘1’ character (the ASCII code / Unicode code point representing the digit) is 49. Add 2 to it and you get 51.
C (and several related languages) will do the same if you evaluate
'1' + 2
.