View Single Post
  #5   Report Post  
Old February 4th 04, 05:33 AM
Neoklis
 
Posts: n/a
Default

Robert Spooner wrote in message ...

I looked at the URL, and you've done a lot of work to update the code.
That is commendable, and you deserve thanks from the amateur community.
You certainly have my thanks. I'm curious to know how much regression
testing you've done.

Hi Bob,

Thanks for the nice words. I tested the translation as much as I could
by comparing my version of program flow with the original source. It was
possible this way to spot a lot of bugs, most of them related to
"off-by-one" errors since fortran uses indices from 1 - n while C from
0 - (n-1). Also untangling GOTO's required a lot of changes mainly in
"spaghetti" sections and these were also prone to errors.

Eventually I debugged the code as far as was possible by constructing
input files that would hopefully put NEC2 through all possible paths
(there are about 1275 if conditionals and about 450 do/while loops!)
and comparing the output with the original fortran code. I then tried
a large number of input files found on the internet and compared outputs.
I had very good agreement in all my tests but I am sure that some
combination in an input file will trigger off hidden bugs.

73's "Nick" 5B4AZ