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
![]() |
|||
|
|||
![]()
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 |
#4
![]() |
|||
|
|||
![]()
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. |
#5
![]() |
|||
|
|||
![]()
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. |
#6
![]() |
|||
|
|||
![]()
"JLE":
[snip] The code is much more portable in C. [snip] I disagree.... where are the equivalent high quality field proven mathematical subroutine libraries? Jeesh... software "fads"... Just because some computer jockey say it's fashionable ya'll follow along like sheep to the slaughter! Shades of Bill Gates crappy bloatware. His empire would have collapsed long ago if not for us hard working hardware Engineers. It's that slavish devotion to software "fashion" that we see exhibited in this thred that created Gates evil empire in the first place! What do people see in "C"? :-) [snip] He has done the amateur community a real service and is to be commended. Your inane comments to the contrary. [snip] I agree the OP has done some heavy lifting, but done us service! Ummm. Nahhh! How many bugs has he introduced in a perfectly fine program? Compared to C, modern Fortran is much more suitable in all aspects such as precision, speed and clairity of purpose and understanding in alignment to the original mathematics. Fortran has "native" support for complex and vector/matrix arithmetic all advantages over C when applied to large mathematical manipulations involving complex arithmetic and multi-dimensional complex arrays such as in NEC. C is a system programming language, not a mathematical programming language! A skilled tradesman uses the right tool for the right job. There are jobs for which C is quite suitable, but large mathematical operations like NEC is not one of them! C seems simple, but hey... where are all of those extensive widely proven highly accurate math subroutine libraries for C! Ugh! The problem with these danged "so-called" computer scientists is that they all want to make every tool a religion and don't know which tool to use for which job. Why use a sledge hammer to open a walnut? Or a saw to slice bread? Hey... get real, we Hardware Engineers never let "slide rule scientists" tell us how to compute, why now then do we let these so-called "computer scientists" tell us we are using the wrong tools, when we know better! Wake up... Don't fall for their stupid con games! They'l soon all be replaced by GUI visual code generating automatons anyway! Converting NEC to Fortran 90/95 would have made more sense than converting it to C. I agree, FORTRAN (66 and 77) are old and showing their age. But that's not the point! FORTRAN should be updated to Fortran, not to C! Modern Fortran supports all of the old FORTRAN code, and modern concepts suporting GOTO-less efficient software engineering friendly control structures. There is no portability problem, Fortran 90/95 is a very modern language, with all of the "modern" structures one expects but without any of the downsides that non-mathematical languages such as C exhibit when pitted against tough mathematical operations. Fortran 90/95 also has widely available very fast proven optimizing compilers, some of them are even free. Long live Fortran... -- Peter K1PO Indialantic By-the-Sea, FL "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. |
#7
![]() |
|||
|
|||
![]()
Peter wrote,
Modern Fortran supports all of the old FORTRAN code, and modern concepts suporting GOTO-less efficient software engineering friendly control structures. There is no portability problem, Fortran 90/95 is a very modern language, with all of the "modern" structures one expects but without any of the downsides that non-mathematical languages such as C exhibit when pitted against tough mathematical operations. Fortran 90/95 also has widely available very fast proven optimizing compilers, some of them are even free. Long live Fortran... -- Peter K1PO Indialantic By-the-Sea, FL Peter... Uh, Peter? You're free to do all the coding yourself if you'd like to. Converting NEC to Fortran 90/95 would be a good project for you in your retirement. 73, Tom Donaly, KA6RUH |
#8
![]() |
|||
|
|||
![]()
On Wed, 04 Feb 2004 22:18:41 GMT, "Peter O. Brackett"
wrote: Long live Fortran... Peter, You are simply being provincial. "Fortran" indeed as if that were the mantle of authority to vindicate bad design. And then to string out all the flavors which, by the way, invalidates the caprice that Fortran is the end-all be-all. I cut my teeth on Fortran IV and have progressed through more than a dozen languages and their dialects. BFD! Whining over "where's the C math libraries?" when Fortran implementations offer no better insurance is a tedious argument. Your hick elitism smacks of the plowboy showing off his new oxfords to the fellows in boots. 73's Richard Clark, KB7QHC |
#9
![]() |
|||
|
|||
![]()
I disagree.... where are the equivalent high quality field proven
mathematical subroutine libraries? Sorry, but IMSL, LAPACK, BLAS, ... (to name a few) all are equally well usable from Fortran, C, or C++. A given vendor usually writes these underlying bits by hand from assembler anyway to get maximum performance. It then makes no difference what language you use at the high level. Maybe 20 years ago Fortran compilers in general produced faster code than C compilers, but not today. Speaking as a computational physicist who programs many large-scale numerical simulations, I usually use C. C is often much better from a data manipulation standpoint. Try implementing a doubly-linked list in Fortran. Yes, such things can be useful in numerical algorithms. I'm glad there's a readable version of NEC in C available now, this will make interfacing it with a gui much easier. NEC for typical amateur antennas runs so fast on todays processors, the important thing is easily visualizing the input and output. I'm curious what free Fortran 90/95 compiler you refer to? "evaluation versions" that expire after xx days don't count ![]() Torsten N4OGW |
#10
![]() |
|||
|
|||
![]()
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 |
Reply |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Porting NEC2 Fortran->C, need help | Antenna | |||
Porting NEC2 Fortran->C, need help | Antenna |