So when I first wrote the code below I believed it was a problem with passing local new style arrays to a function but after testing the code it seems to be the Initialization list of the new style arrays but it still demonstrates the point:
// Project: ArrayTest
// Created: 2016-08-14
SetWindowTitle( "ArrayTest" )
SetWindowSize( 1024, 768, 0 )
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
Do
ArraySetup()
Sync()
Loop
Function ArraySetup()
Dim DimmedArray[1] As Integer = [10, 20]
Global Dim GlobalDimmedArray[1] As Integer = [10, 20]
NewArray As Integer[1] = [10, 20]
Global GlobalNewArray As Integer[1] = [10, 20]
//NewArray[0] = 10
//NewArray[1] = 20
ArrayPrinter(DimmedArray, GlobalDimmedArray, NewArray, GlobalNewArray)
EndFunction
Function ArrayPrinter(DimmedArray As Integer[], GlobalDimmedArray As Integer[], NewArray As Integer[], GlobalNewArray As Integer[])
Print(DimmedArray[1])
Print(GlobalDimmedArray[1])
Print(NewArray[1])
Print(GlobalNewArray[1])
EndFunction
So a local dim array works fine, a global dim array works fine, a global new style array works fine, but a local new style array contains only zeros, uncommenting the two line in ArraySetup() function allows the result I expect, or am I simply doing this wrong?