Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A Fortran question

A Fortran question

Scheduled Pinned Locked Moved The Lounge
questionvisual-studio
40 Posts 22 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Southmountain
    wrote on last edited by
    #1

    I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

    diligent hands rule....

    S L R 0 M 13 Replies Last reply
    0
    • S Southmountain

      I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

      diligent hands rule....

      S Offline
      S Offline
      Slacker007
      wrote on last edited by
      #2

      Might be able to use VS Code for this? Visual Studio Code support with Modern Fortran - Intel Communities[^] fortran - Visual Studio Marketplace[^]

      1 Reply Last reply
      0
      • S Southmountain

        I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

        diligent hands rule....

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Southmountain wrote:

        also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

        Ehr.. Fortran?? We keep burying VB6. Fortran?? Do we need to shoot it again? Is the Fortran code worth anything? If yes, then maybe rewrite it in a modern language? You made me curious and awaiting your answer.

        Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

        S T A 4 Replies Last reply
        0
        • S Southmountain

          I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

          diligent hands rule....

          R Offline
          R Offline
          RickZeeland
          wrote on last edited by
          #4

          You can find a list with popular IDE's here: IDEs — Fortran Programming Language[^] And for those interested in a bit of Fortran history: FORTRAN in 100 Seconds - YouTube[^]

          S 1 Reply Last reply
          0
          • L Lost User

            Southmountain wrote:

            also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

            Ehr.. Fortran?? We keep burying VB6. Fortran?? Do we need to shoot it again? Is the Fortran code worth anything? If yes, then maybe rewrite it in a modern language? You made me curious and awaiting your answer.

            Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

            S Offline
            S Offline
            Southmountain
            wrote on last edited by
            #5

            yes, it implements some algorithms on astrophysics I guess...

            diligent hands rule....

            T 1 Reply Last reply
            0
            • R RickZeeland

              You can find a list with popular IDE's here: IDEs — Fortran Programming Language[^] And for those interested in a bit of Fortran history: FORTRAN in 100 Seconds - YouTube[^]

              S Offline
              S Offline
              Southmountain
              wrote on last edited by
              #6

              I did read this page and decide to go with Code::Block...

              diligent hands rule....

              J 1 Reply Last reply
              0
              • S Southmountain

                I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

                diligent hands rule....

                0 Offline
                0 Offline
                0x01AA
                wrote on last edited by
                #7

                For first trials, on of sveral online: Online Fortran Compiler - online editor[^]

                1 Reply Last reply
                0
                • S Southmountain

                  I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

                  diligent hands rule....

                  M Offline
                  M Offline
                  MarkTJohnson
                  wrote on last edited by
                  #8

                  What did you do to get punished like that?

                  I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.

                  S 1 Reply Last reply
                  0
                  • S Southmountain

                    I did read this page and decide to go with Code::Block...

                    diligent hands rule....

                    J Offline
                    J Offline
                    jmaida
                    wrote on last edited by
                    #9

                    I was going to recommend Code Blocks. I use a lot. Great editor.

                    "A little time, a little trouble, your better day" Badfinger

                    1 Reply Last reply
                    0
                    • S Southmountain

                      I got some Fortran code with the extension .f. how difficult to run through them in GFortran now? I have touched Fortran since I left school. also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

                      diligent hands rule....

                      J Offline
                      J Offline
                      jmaida
                      wrote on last edited by
                      #10

                      I used Fortran (77, 90) for years back in the day. It's claim to fame is very fast execution of mathematical problems, maybe the fastest. I was told it was the main compiler used for NOAA's super computers to predict/simulate weather systems. Today, of course, GPU's have come to the fore front so unless Fortran has been ported to these systems it may be eclipsed. Lot of Fortran code is still around.

                      "A little time, a little trouble, your better day" Badfinger

                      R T FreedMallocF 3 Replies Last reply
                      0
                      • J jmaida

                        I used Fortran (77, 90) for years back in the day. It's claim to fame is very fast execution of mathematical problems, maybe the fastest. I was told it was the main compiler used for NOAA's super computers to predict/simulate weather systems. Today, of course, GPU's have come to the fore front so unless Fortran has been ported to these systems it may be eclipsed. Lot of Fortran code is still around.

                        "A little time, a little trouble, your better day" Badfinger

                        R Offline
                        R Offline
                        Rick York
                        wrote on last edited by
                        #11

                        If I am not mistaken, CUDA can be used with FORTRAN.

                        "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                        J 1 Reply Last reply
                        0
                        • R Rick York

                          If I am not mistaken, CUDA can be used with FORTRAN.

                          "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                          J Offline
                          J Offline
                          jmaida
                          wrote on last edited by
                          #12

                          I would not be surprised. Thanx, I didn't know that.

                          "A little time, a little trouble, your better day" Badfinger

                          1 Reply Last reply
                          0
                          • L Lost User

                            Southmountain wrote:

                            also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

                            Ehr.. Fortran?? We keep burying VB6. Fortran?? Do we need to shoot it again? Is the Fortran code worth anything? If yes, then maybe rewrite it in a modern language? You made me curious and awaiting your answer.

                            Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                            T Offline
                            T Offline
                            trønderen
                            wrote on last edited by
                            #13

                            Eddy Vluggen wrote:

                            We keep burying VB6. Fortran?? Do we need to shoot it again?

                            Don't worry - it was shot, the Fortran giving you nightmares. C.A.R. Hoare was right in his remark to the proposed extensions for Fortran 77: "I don't know what programming languages will look like in year 2000, but they will be named Fortran!" I suspect that if you were presented with sample of modern Fortran code, you would never guess that the language is named Fortran. The evolution from Fortran IV to modern Fortran is more drastic than the evolution of the original thick coax 3 Mbps linear bus Ethernet to the Ethernet of today, using Cat6/RJ45, 1 Gbps, star topology. A couple of years ago, a friend of mine working at the Supercomputing center of the Norwegian Universities. He told me that Fortran (in the modern form) still is a very significant language in supercomputer environments. Lots of scientists / developers find Fortran much more suitable than C/C++ for array manipulation, and lots of engineering problems are essentially array manipulation.

                            N L 2 Replies Last reply
                            0
                            • L Lost User

                              Southmountain wrote:

                              also I searched around and try to find a good IDE for GFortran. any recommendations for such IDEs?

                              Ehr.. Fortran?? We keep burying VB6. Fortran?? Do we need to shoot it again? Is the Fortran code worth anything? If yes, then maybe rewrite it in a modern language? You made me curious and awaiting your answer.

                              Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                              T Offline
                              T Offline
                              trønderen
                              wrote on last edited by
                              #14

                              Eddy Vluggen wrote:

                              Is the Fortran code worth anything? If yes, then maybe rewrite it in a modern language?

                              "If if works, don't fix it!" Rewriting software to a potentially poorly suited other language, just because that other language is fashionable in many software development communities, may be a bad idea. Not always, but you need some stronger arguments than "We don't think Fortran IV reflects modern ideas about programming languages."

                              H 1 Reply Last reply
                              0
                              • J jmaida

                                I used Fortran (77, 90) for years back in the day. It's claim to fame is very fast execution of mathematical problems, maybe the fastest. I was told it was the main compiler used for NOAA's super computers to predict/simulate weather systems. Today, of course, GPU's have come to the fore front so unless Fortran has been ported to these systems it may be eclipsed. Lot of Fortran code is still around.

                                "A little time, a little trouble, your better day" Badfinger

                                T Offline
                                T Offline
                                trønderen
                                wrote on last edited by
                                #15

                                Another good thing about old style Fortran: You wouldn't experience any stack overflow, no out of heap space, no null pointer exception. Pre-90 Fortran didn't allow recursion, and had no dynamic allocation. All memory could be statically allocated. No run time load, no risk. Lots of computing tasks can be solved without recursion, without new()/pointers. If you absolutely must do a recursion, you can manage your own stack by an array. Similar with linked lists. In my student days, I was a TA for the Introduction to Programming course, taught to all Tech. University students. Some of the "classical" departments were still clinging to Fortran as the only viable language; half of the students were more modern, learning Pascal. The courses were identical, except for the language (even the textbook was identical but for the coding examples). 3 out of 4 hand-ins were identical. For the last one, the Pascal students were to build and manipulate a linked list, so the Fortran students had a completely different #4 hand-in. One of the 'Fortran students' approached me, rather crossed: Why shall the others learn something that we don't get to learn? So I tried to explain to her how you could have a record field tell where you could find the next piece of data. I believe that I explained it referring to memory as a large array, the pointer being the index in that array. A few days later, this freshman girl approached me again, this time with Fortran code to solve the Pascal linked list problem, the 'heap' was a Fortran array, pointers were integers indexing the array, and the code certainly did solve the problem, giving the proper output. If a freshman, non-computer girl (I think she was studying chemistry) can do it in Fortran, then a seasoned Fortran programmer with thirty years of experience should be able to!

                                J J G 3 Replies Last reply
                                0
                                • M MarkTJohnson

                                  What did you do to get punished like that?

                                  I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.

                                  S Offline
                                  S Offline
                                  Southmountain
                                  wrote on last edited by
                                  #16

                                  personal hobby for astrological questions in financial areas...

                                  diligent hands rule....

                                  1 Reply Last reply
                                  0
                                  • J jmaida

                                    I used Fortran (77, 90) for years back in the day. It's claim to fame is very fast execution of mathematical problems, maybe the fastest. I was told it was the main compiler used for NOAA's super computers to predict/simulate weather systems. Today, of course, GPU's have come to the fore front so unless Fortran has been ported to these systems it may be eclipsed. Lot of Fortran code is still around.

                                    "A little time, a little trouble, your better day" Badfinger

                                    FreedMallocF Offline
                                    FreedMallocF Offline
                                    FreedMalloc
                                    wrote on last edited by
                                    #17

                                    You are correct about NOAA. Most, if not all, the main climate models used to predict weather are written in Fortran. When my daughter first started college she was looking at meteorology. We talked to a professor about it and I noticed several Fortran books on his shelf. I asked about them and he told us about the models which were written in the 50s and 60s in Fortran. They are large and complex so rewriting them would be difficult and error prone. And, Fortran has been likened to NASCAR - go fast and turn left. In other words, flexibility/readability is not the main thing, speed is. The professor said the the models have evolved a lot over the years and aren't completely understood. Which would make rewrites to a "modern" language even more problematic.

                                    1 Reply Last reply
                                    0
                                    • S Southmountain

                                      yes, it implements some algorithms on astrophysics I guess...

                                      diligent hands rule....

                                      T Offline
                                      T Offline
                                      trønderen
                                      wrote on last edited by
                                      #18

                                      If you plan to do programming in the area of astrophysics ... There was an excellent program called Astronomy Lab for Windows, ALW - or ALW203 for the last version; I believe it was published in 1996. Maybe I should say that there is (not 'was') this program: It will still run under Windows 10. The functionality is great. The only problem is that the user interface suggests that it was developed under Windows 1.0. You can't zoom fonts, all text is monospaced 'fixedsys' (the 'Set font' command has no effect), tables are drawn using |, + and - characters, graphs are drawn using hairlines, there is no support for cut & paste, scroll wheel and several other standard Windows functions. 30 years ago I was in contact with the developer, offering to update the user interface (I had a visually handicapped daughter who couldn't see the hairlines and needed a bigger font), but I was turned down: He had no intentions to continue developing the program, so there was no reason for him to let anyone improve the UI(!) I have never found any replacement for ALW providing the same functionality and simplicity of use (in spite of its UI shortcomings). So if you go ahead developing anything with similar functionality, and a more modern UI, please use ALW as a checklist for what to include, and present the results as a CP article! ALW203 is still available for downloading from a large number of sites on internet.

                                      1 Reply Last reply
                                      0
                                      • T trønderen

                                        Another good thing about old style Fortran: You wouldn't experience any stack overflow, no out of heap space, no null pointer exception. Pre-90 Fortran didn't allow recursion, and had no dynamic allocation. All memory could be statically allocated. No run time load, no risk. Lots of computing tasks can be solved without recursion, without new()/pointers. If you absolutely must do a recursion, you can manage your own stack by an array. Similar with linked lists. In my student days, I was a TA for the Introduction to Programming course, taught to all Tech. University students. Some of the "classical" departments were still clinging to Fortran as the only viable language; half of the students were more modern, learning Pascal. The courses were identical, except for the language (even the textbook was identical but for the coding examples). 3 out of 4 hand-ins were identical. For the last one, the Pascal students were to build and manipulate a linked list, so the Fortran students had a completely different #4 hand-in. One of the 'Fortran students' approached me, rather crossed: Why shall the others learn something that we don't get to learn? So I tried to explain to her how you could have a record field tell where you could find the next piece of data. I believe that I explained it referring to memory as a large array, the pointer being the index in that array. A few days later, this freshman girl approached me again, this time with Fortran code to solve the Pascal linked list problem, the 'heap' was a Fortran array, pointers were integers indexing the array, and the code certainly did solve the problem, giving the proper output. If a freshman, non-computer girl (I think she was studying chemistry) can do it in Fortran, then a seasoned Fortran programmer with thirty years of experience should be able to!

                                        J Offline
                                        J Offline
                                        jmaida
                                        wrote on last edited by
                                        #19

                                        yes, you correct. Code was all statically determined at compile time. Recursion was simulated with one's own stack arrays again already pre-allocated. If it was memory resident at execution time, it was bullet fast. For many problems, the only thing not static was disk I/O. True the memory it used was static, but I/O times were not guaranteed fixed. Virtual memory was another variable not guaranteed fixed, but for most purposes, it was as good as fixed.

                                        "A little time, a little trouble, your better day" Badfinger

                                        1 Reply Last reply
                                        0
                                        • T trønderen

                                          Eddy Vluggen wrote:

                                          We keep burying VB6. Fortran?? Do we need to shoot it again?

                                          Don't worry - it was shot, the Fortran giving you nightmares. C.A.R. Hoare was right in his remark to the proposed extensions for Fortran 77: "I don't know what programming languages will look like in year 2000, but they will be named Fortran!" I suspect that if you were presented with sample of modern Fortran code, you would never guess that the language is named Fortran. The evolution from Fortran IV to modern Fortran is more drastic than the evolution of the original thick coax 3 Mbps linear bus Ethernet to the Ethernet of today, using Cat6/RJ45, 1 Gbps, star topology. A couple of years ago, a friend of mine working at the Supercomputing center of the Norwegian Universities. He told me that Fortran (in the modern form) still is a very significant language in supercomputer environments. Lots of scientists / developers find Fortran much more suitable than C/C++ for array manipulation, and lots of engineering problems are essentially array manipulation.

                                          N Offline
                                          N Offline
                                          nickg59
                                          wrote on last edited by
                                          #20

                                          Fortran must be one of the most maligned programming languages ever -- and that's saying something. FORTRAN-IV was pretty awful, admittedly, but versions starting with Fortran-77 onwards were both very useful and usable -- regardless of the opinions of academic computer scientists. And modern Fortran is very much alive and well. Although I've spent most of the last 35 years using C, C++ and Python, I have no complaints about the Fortran versions I used (a lot) way back when and still use for hobbyist purposes. C++, on the other hand ... :-) ... (although C++11 onwards is pretty decent).

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups