Page 1 of 1

Better error message for un-dimed array

Posted: Sun Nov 25, 2018 3:17 am
by Dude
This (runnable!) code produces an "Invalid memory access" error:

Code: Select all

Dim a$(10)
FreeArray(a$())

; ... Imagine lots of code here, so you forget FreeArray() was used ...

a$(1)="test" ; Invalid memory access error. User wonders why?
This error message, while technically correct, is not very helpful when trying to debug your code.

Surely the error message could be something more user-friendly like: "Array has not been Dim'ed."