1/null
Result:
1
Code:
var/a = null
1/a
Result:
Undefined operation: 1 / null
ID:2317890
Nov 23 2017, 7:39 pm
|
|||||||||||||
| |||||||||||||
Code:
1/null Result: 1 Code: var/a = null Result: Undefined operation: 1 / null |
We aren't actually using it ourselves, this came up via the dm irc bot we have (it compiles a project and runs the code) when we were testing how null reacted to be being used in maths to prove a point to somebody who jokingly suggested changing some code to not check for null since it would be seen as zero anyways in part of an algo. (as an aside, no, you can't assume null will be zero in math because it isn't always 0, sometimes its 1).
So the context was world.log << "[1/null]" The only reason I even bothered to make a bug report is because i thought it was super odd that anything in math acted differently when a value was explicitly defined vs stored in a var. |
Where are you using 1/null without the = though? What's the context? I know on its own the compiler will definitely complain about a missing expression.