I have some questions about initialisation of variables and arrays, which don't seem to be mentioned anywhere in the documentation.
Are ints always initialised to 0 if declared without initialisation? What about floats?
I was looking at monkey.stack and it seems to rely upon this. Also it seems to depend on:
Local a:Int[]
a = a.Resize( 10 )
..which I wouldn't have expected to be allowed. But then again arrays are not objects, so this may be a beneficial side effect.
Can we rely on numeric values always being initialised to zero? And the resizeability of uninitialised arrays?
[I want to make a huge array of stacks, many of which will be discarded without being used, so the absence of any need for initialisation of the array component is a boost to efficiency.]
|