Missing fb error message

Forum for discussion about the documentation project.
Post Reply
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Missing fb error message

Post by Kot »

Try this:

Dim Array(25) as Integer
Array(29)=12
Print Array(29)
Sleep

and output is 12, although there should be an error. And try this:

dim Array(25) as Integer
Array(129)=12
print Array(129)
Sleep

and still no error message, only windows "there was problem with the application and it will be closed. Send error report to Micro$oft". I think there should be some fb error for beginners like me ;-) (better not leave this to Micro$oft)
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Post by DrV »

If you compile with -exx (bounds checking), your program will terminate with an error message(printed in the console) whenever you access an array out of bounds (among other errors that are checked with this switch).
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Post by Kot »

Thanks. I appreciated this feature when I compared program speed - sometimes -exx optcion slowed it down more than twice. I must write my programs more carefully :-)
Post Reply