But when I tried to assign "cat" as a string for names[0] manually, the print("names[0]="+names[0]) did shows "cat", instead of an empty string
// Project: Test array
// Created: 2016-02-22
// set window properties
SetWindowTitle( "Test array" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
global names as string[0] = [ "cat" ]
names[0] = "cat"
global names1 as string[1] = [ "cat", "dog" ]
do
print("names[0]="+names[0])
print("names1[0]="+names1[0])
Sync()
loop
So this bug only occurs when we tried to assign values to arrays with size of[0], by 'directly' assigning it in this form?
global names as string[0] = [ "cat" ]
But will not occur if we do this?
names[0] = "cat"