If an array is declared as global within a procedure and the array is accessed outside the procedure before the procedure is called, the compiler will not complain about this. The program is compiled "without" errors, but then crashes with a memory access error.
Code: Select all
EnableExplicit
Procedure Test()
Global Dim MyArray.s(1)
MyArray(0) = "Hello"
EndProcedure
; Test()
Debug MyArray(0)
Test()
The compiler should notice this
Kind Regards,
Kurzer