Addition Bug in HTML5
Monkey Forums/Monkey Bug Reports/Addition Bug in HTML5
| ||
This bug had me banging my head against the desk for hours. I couldn't figure out why my graphics were not aligned: here is the example in html: Strict Function Main:Int() Local x:Int = 0 Local y:Int = 0 Local py:Int= 0 Print (x +064 +py) Return 1 End Function it supposed to display 64 but it displays 52 thats on Chrome and Safari in my MacBook. |
| ||
considering that that below is the javascript source:print(String(t_x+064+t_py)); I am guessing that's java script normal behavior. Or a javascript bug? |
| ||
Nice find! Javascript thinks any number with a leading zero is octal, go figure, but monkey should be normalizing such things out. |