@Winni
Thanks for the informations. Yes, I understand what you say: there aren't really errors in the program, but it's rather a programming style. Indeed the program works well when range checking is off.
Tracking the errors was a way for me to study the program and try to understand how it works. But for now I think I will let it as it is.
By the way, I tested the program on Windows (on two different machines). It works, but is very slow.