On Friday 11 June 2004 07:45, Greg Lindahl wrote:
> 2) If your compiler has flags to initialize all variables to zero, use
> them. Really good compilers can do this for automatic variables, too.
>
Hello,
I think that's the wrong way to go, because it hides the bug in the code
from the user.
Better all variables should be set to some invalid data (like NaN), unless
explicitely initialized.
> 3) If you use allocatable arrays, see if your compiler has switches to
> initialize these arrays, and check for overwriting the beginning and
> end.
Yes, I would switch all debugging aids on to locate the problem.
Array indices are a frequent source of troubles.
Alois
|