Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi all,
I have just completed a translation of NEC2 from fortran to C which was done "manually" and thus has no dependency on f2c and similar auto translators. I have also incorporated changes to the source code so that built-in limitations are removed as far as possible and the use of file storage for solving complex structures is not needed. More info and source/binary packages form the nec2 archives: http://www.qsl.net/wb6tpu/swindex.html Please note my email address is: neoklisk-AT-cytanet-DOT-com-DOT-cy Best regards Neoklis - 5B4AZ |
#3
![]() |
|||
|
|||
![]()
Neoklis wrote:
Hi all, I have just completed a translation of NEC2 from fortran to C which was done "manually" ... Neoklis, 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. 73, Bob AD3K -- Robert L. Spooner Registered Professional Engineer Associate Research Engineer Intelligent Control Systems Department Applied Research Laboratory Phone: (814) 863-4120 The Pennsylvania State University FAX: (814) 863-7841 P. O. Box 30 State College, PA 16804-0030 |
#4
![]() |
|||
|
|||
![]()
Richard Clark wrote in message . ..
On 3 Feb 2004 06:37:38 -0800, (Neoklis) wrote: Hi Neoklis, This is a very clear and readable source. Good work. I am especially impressed by your comment: "All GO TO constructs have been removed (all 961 of them!) and 'spaghetti' code sections untangled as far as was possible to the author." How long did this take? Thanks for the good words, Richard. I started work on August 20 last year and have been working on it most of the time till now so its about 5 months. Was very hard at times but I am glad I did not give up! 73's "Nick" 5B4AZ |
#5
![]() |
|||
|
|||
![]()
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 |
#6
![]() |
|||
|
|||
![]()
Richard:
[snip] This is a very clear and readable source. Good work. I am especially impressed by your comment: "All GO TO constructs have been removed (all 961 of them!) and 'spaghetti' code sections untangled as far as was possible to the author." How long did this take? 73's Richard Clark, KB7QHC [snip] From Fortran to C, what a waste of coding time... and how many errors were introduced in the translation? Heh, heh. :-) Many would feel... What a crime? What's wrong with perfectly good Fortran? BTW... there's nothing wrong with "GOTO"s that aren't readily fixed with simple matching "COMEFROM" statements! Rest in Peace E. Djkystra! ;-) -- Peter K1PO Indialantic By-the-Sea, FL. |
#7
![]() |
|||
|
|||
![]()
would you care to compare the number of platforms that have a C compiler Vs
a FORTRAN compiler? The code is much more portable in C. He has done the amateur community a real service and is to be commended. Your inane comments to the contrary. "Peter O. Brackett" wrote in message ink.net... From Fortran to C, what a waste of coding time... and how many errors were introduced in the translation? Heh, heh. :-) Many would feel... What a crime? What's wrong with perfectly good Fortran? BTW... there's nothing wrong with "GOTO"s that aren't readily fixed with simple matching "COMEFROM" statements! Rest in Peace E. Djkystra! ;-) -- Peter K1PO Indialantic By-the-Sea, FL. |
#8
![]() |
|||
|
|||
![]()
Peter O. Brackett wrote:
From Fortran to C, what a waste of coding time... and how many errors were introduced in the translation? Heh, heh. :-) And how many were fixed? From what he says about his test results, very, very few errors were introduced. Many would feel... What a crime? Many more might feel "What crime?". What's wrong with perfectly good Fortran? Same thing that's wrong with a perfectly good boil on your ass. 8-) BTW... there's nothing wrong with "GOTO"s that aren't readily fixed with simple matching "COMEFROM" statements! Try Cobol. The 'ALTER' statement was a computed come-from! Fortran programmers can only dream of the job security that flowed from that. Rest in Peace E. Djkystra! A good Fortran programmer can write Fortran in any language. ;-) What Neoklis has done seems to avoid that pitfall. If he has made all that NEC2 spaghetti more comprehensible to mere mortals then he's done us all a really big favour. vy 73 Andy, M1EBV |
#9
![]() |
|||
|
|||
![]()
In article . net,
Peter O. Brackett wrote: From Fortran to C, what a waste of coding time... and how many errors were introduced in the translation? Heh, heh. :-) "Make your peace with FORTRAN, for it is as perennial as crabgrass." Many would feel... What a crime? What's wrong with perfectly good Fortran? BTW... there's nothing wrong with "GOTO"s that aren't readily fixed with simple matching "COMEFROM" statements! Heh. Real programmers used Assigned GOTO statements (or the even studlier COBOL "ALTER" verb). (grin, duck, run away very very fast....) -- Dave Platt AE6EO Hosting the Jade Warrior home page: http://www.radagast.org/jade-warrior I do _not_ wish to receive unsolicited commercial email, and I will boycott any company which has the gall to send me such ads! |
#10
![]() |
|||
|
|||
![]() "Neoklis" wrote in message om... Hi all, I have just completed a translation of NEC2 from fortran to C which was done "manually" and thus has no dependency on f2c and similar auto translators. I have also incorporated changes to the source code so that built-in limitations are removed as far as possible and the use of file storage for solving complex structures is not needed. More info and source/binary packages form the nec2 archives: http://www.qsl.net/wb6tpu/swindex.html Please note my email address is: neoklisk-AT-cytanet-DOT-com-DOT-cy Best regards Neoklis - 5B4AZ |
Reply |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Porting NEC2 Fortran->C, need help | Antenna | |||
Porting NEC2 Fortran->C, need help | Antenna |