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. Fortran

Fortran

Scheduled Pinned Locked Moved The Lounge
databasecomannouncement
39 Posts 21 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.
  • A Amarnath S

    Not to forget the now infamous GOTO, which was indeed a saviour in those days.

    S Offline
    S Offline
    StanThomas
    wrote on last edited by
    #30

    During my student days, we wrote a spoof Fortran language proposal to add the COMEFROM statement to replace the much derrided GOTO

    T 1 Reply Last reply
    0
    • R Robert Chafer

      I have been writing Fortran since 1989 and have never used a punched card (or tape)

      S Offline
      S Offline
      StanThomas
      wrote on last edited by
      #31

      IBM 026 card punch machines and Olivetti teletypes producing blue paper tape where my starting point. Still have some original, unpunched, Fortran Statement cards kept as a souvenir.

      1 Reply Last reply
      0
      • L Lost User

        The joy of fixed column coding. :-D

        R Offline
        R Offline
        Ralf Quint
        wrote on last edited by
        #32

        Seems you are not quite up to date if you are making such statements. And thus don't know the difference between FORTRAN and Fortran... ;P

        1 Reply Last reply
        0
        • R Robert Chafer

          I remember having to modify someone's C who wrote mainly in Fortran. It was basically Fortran with C syntax. You can write Fortran in any language.

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #33

          I'm not aware of an arithmetic IF in C :)

          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

          T 1 Reply Last reply
          0
          • A Amarnath S

            Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.

            C Offline
            C Offline
            charlieg
            wrote on last edited by
            #34

            "millennium" A little bold there :). But anyway, I've always been astonished at the amount of code that is our there written in "legacy" languages that run the world. Cobol, FORTRAN, PL1, God forbid Pascal. I'm in the process this year of proposing a system re-write of a FORTAN manufacturing system before everybody that knows about it is dead, including myself. I dug into this 10 years back or so, and I realized that 40% of the code is user input, 20% is actually processing data, and the last 40% is report generation. Moving this to a modern architecture will likely reduce the code base by 75%. Meanwhile this company has spent millions trying to create an equivalent system. I'm shooting for retirement income :)

            Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

            1 Reply Last reply
            0
            • S StanThomas

              During my student days, we wrote a spoof Fortran language proposal to add the COMEFROM statement to replace the much derrided GOTO

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

              According to Wikipedia, the first comefrom dates back to 1973. My first encounter with comefrom was in the Babbage programming language, from 1981 (Babbage - The language of the future[^]). Babbage has a lot of other nice features, such as the 'conditional threat statement: DO so and so OR ELSE; For function calls, you have not only call by value and call by reference, but also call by long distance. For case switches, it has the BRIEF CASE statement to encourage portable programming. A few years ago, I needed programmatic access to the backtrace in an exception handler (maybe there were libraries to do it, even at that time, but I found none, and it wasn't that much work doing it myself). 'ComeFrom' was an obvious name for the stack traversal routine, to show where execution came from when walking into the code causing the exception.

              Religious freedom is the freedom to say that two plus two make five.

              1 Reply Last reply
              0
              • C charlieg

                I'm not aware of an arithmetic IF in C :)

                Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

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

                It is written in longhand C as

                if (expr < 0) goto lab1;
                else if (expr == 0) goto lab2;
                else goto lab3;

                If you accept use of jump labels at all, that is. The C version is not as compact as Fortran, but you could easily make a #define for putting it on a single line.

                Religious freedom is the freedom to say that two plus two make five.

                C 1 Reply Last reply
                0
                • T trønderen

                  It is written in longhand C as

                  if (expr < 0) goto lab1;
                  else if (expr == 0) goto lab2;
                  else goto lab3;

                  If you accept use of jump labels at all, that is. The C version is not as compact as Fortran, but you could easily make a #define for putting it on a single line.

                  Religious freedom is the freedom to say that two plus two make five.

                  C Offline
                  C Offline
                  charlieg
                  wrote on last edited by
                  #37

                  well for sure. and for the record I despise #define/macros unless they are very very simple. I've seen some developers put darn near full functions in them. I never understood why you would do that, but whatever.

                  Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

                  1 Reply Last reply
                  0
                  • A Amarnath S

                    Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.

                    O Offline
                    O Offline
                    OldDBA
                    wrote on last edited by
                    #38

                    My First computer language was also FORTRAN, though a bit earlier in 1965. The first run of my first program caused a core dump because I left out a minus sign. I had no idea what that was at that time, but it seemed to excite the people assisting us in the lab. The corrected program got the results I wanted. Haven't used it since my student days though.

                    1 Reply Last reply
                    0
                    • A Amarnath S

                      Perhaps, for the first time in this millennium, FORTRAN comes in the Top 10 [TIOBE Index - TIOBE](https://www.tiobe.com/tiobe-index/) [^] As a side note, my 'mother-tongue' is FORTRAN, being the first computer language i learnt in 1987. Hope this news isn't a repeat.

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #39

                      Amarnath S wrote:

                      FORTRAN comes in the Top 10

                      I wouldn't get too excited. If you look at the chart Fortran has been bubbling along at about the same rate for decades. The rate of change around level 10 is at tenths of a percent. Visual Basic is almost twice as high and COBOL is only 0.6% lower. Matter of fact Visual Basic percentage change went down in the in the last month than the entire value for Fortran. If you want to get excited then C, C++, Java and C# together dropped an amazing 10%.

                      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