Monkey do not check "unused" code - even if you set strict mode
Strict
Import mojo
Global table:Int[100]
Class Program Extends App
Method OnCreate:Int ()
SetUpdateRate(60)
Return 0
End
Method OnUpdate:Int ()
Return 0
End
Method OnRender:Int ()
Return 0
End
End
Function dummy:Void () '<<<unused
table(1) = 1 '<<<< this is wrong, but monkey think my code is ok
End
Function Main:Int ()
New Program()
Return 0
End
As you can see above code - i add a bug to a line, but this code is not checked, because it is unused...
This can have side-effects, if you use that block of code later...
|