I have found a strange behavior.
If i declare an empty Array and write code that try to access
an element of that array, but have no code wich dimensions that
array the compiler will not compile my code with error 461.
Should it not be better a runtime error instead of a compiler error?
Example
Global MyArray() as MyType
'Remove the comments in PBMain and the code will compile
Function PBMain ....
'Redim MyArray(0) as MyType
'Erase MyArray
Msgbox MyArray(1).MyTypeMember
End Function
... a lot of other functions
Regards,
Torsten
------------------
If i declare an empty Array and write code that try to access
an element of that array, but have no code wich dimensions that
array the compiler will not compile my code with error 461.
Should it not be better a runtime error instead of a compiler error?
Example
Global MyArray() as MyType
'Remove the comments in PBMain and the code will compile
Function PBMain ....
'Redim MyArray(0) as MyType
'Erase MyArray
Msgbox MyArray(1).MyTypeMember
End Function
... a lot of other functions
Regards,
Torsten
------------------
Comment