Option for detecting errors

General FreeBASIC programming questions.
Post Reply
toml_12953
Posts: 27
Joined: Jul 07, 2005 12:37
Location: Malone, NY
Contact:

Option for detecting errors

Post by toml_12953 »

Currently, FB has no way to detect common errors, such as accessing elements of arrays outside their bounds, trying to read past the end of data, and overflow to mention a few. This is counter to almost all other versions of BASIC. Would it be possible to add a switch to test for these errors? I know it would slow down the EXE but on a fast machine, it's still fast enough.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Post by fxm »

Among compiling options, you can use the option -exx (error checking with RESUME support + array bounds and null-pointer checking).
See documentation.
toml_12953
Posts: 27
Joined: Jul 07, 2005 12:37
Location: Malone, NY
Contact:

Post by toml_12953 »

fxm wrote:Among compiling options, you can use the option -exx (error checking with RESUME support + array bounds and null-pointer checking).
See documentation.
Ah! I looked through the docs but missed that. I tried -ex and then -exx but neither caught the out of data error.
Post Reply