Programming in Fortran

Page 1 of 3 123 LastLast

  1. Posts : 446
    windows 7 Pro 64Bit
       #1

    Programming in Fortran


    I have (for the last year or so) been kicking around the idea of teaching myself to program. After looking into languages such as python, java, C, C++, Visual Basic.net and so on. I have finally decided to teach myself Fortran, somewhat because I'm a history buff. Mostly because I just find the language to be the most interesting of all I have researched. I'm just curious how many Fortran programmers are on this forum and what do you think are the positives and negatives of this language.
      My Computer


  2. Posts : 3,187
    Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
       #2

    Positives - the history, as you mentioned. Supposed to be easy to learn.

    Negatives - if you're thinking about a job down the road, not in very high demand. Might be a dead end.

    Didn't even make the list at Dice.com:

      My Computer


  3. Posts : 2,039
    Several, including Windows 7 x64 Ultimate
       #3

    I used to use it a lot for some special purposes, but it is not very useful for "normal" programming on desktop machines. For most things I actually need to do on my own machine I usually use Autohotkey.

    The history of ForTran ( FORmulaTRANslation).

    The FORTRAN Programming Language

    Fortran - Wikipedia, the free encyclopedia

    Compilers;

    http://www.personal.psu.edu/hdk/fortran.html

    Regards....Mike Connor

    PS. If you want to learn how to program, then you would be better advised to start by learning to use an assembler;

    http://c2.com/cgi/wiki?LearningAssemblyLanguage

    http://en.wikipedia.org/wiki/A86_%28software%29

    Best to start with a simple one as well, using an 8080 emulator or similar;

    http://sim8080.sourceforge.net/

    http://www.sharewareconnection.com/s...ator+Assembler
    Last edited by Mike Connor; 17 Apr 2011 at 23:32.
      My Computer


  4. Posts : 446
    windows 7 Pro 64Bit
    Thread Starter
       #4

    Thank you guys for the reply. At the age of 27 I doubt if I will ever advance to the level of programming professionally. This is mainly just a hobby I'm taking on. My main curiosity was knowing how many other people around here had programmed in Fortran or even had an interest in the idea. As for a compiler I have settled on Approximatrix Simply Fortran which uses the gfortran compiler, so it will even handle some aspects of the Fortran 2003-2008 standard. Also at $25.00 for registration it is the best priced Fortran IDE for windows that is actively developed I have found.
      My Computer


  5. Posts : 3,187
    Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
       #5

    nitroman84 said:
    ...At the age of 27 I doubt if I will ever advance to the level of programming professionally...
    I'll be 52 next month and am learning trying to learn the mysteries of C# as part of my Information Systems major at college. I'm wondering the same thing.
      My Computer


  6. Posts : 446
    windows 7 Pro 64Bit
    Thread Starter
       #6

    profdlp said:
    nitroman84 said:
    ...At the age of 27 I doubt if I will ever advance to the level of programming professionally...
    I'll be 52 next month and am learning trying to learn the mysteries of C# as part of my Information Systems major at college. I'm wondering the same thing.
    Well Happy birthday next month!! I looked into C# myself, but the non-conformist I am I chose basically the first High Level programming language. Although I did look into programming in Assembly My choice is Fortran. Again it goes back to my love of history and where modern tech has evolved from. I can't help but think John Backus would be proud even in 2011 there is somebody interested in learning the language he pioneered.
      My Computer


  7. Posts : 3,187
    Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
       #7

    Well, I can tell you from personal experience that there are a lot of people who are only studying programming because they think it's a ticket to a well paying job. Good for you for doing it for the love of the subject.
      My Computer


  8. Posts : 17,545
    Windows 10 Pro x64 EN-GB
       #8

    profdlp said:
    Well, I can tell you from personal experience that there are a lot of people who are only studying programming because they think it's a ticket to a well paying job. Good for you for doing it for the love of the subject.


    When I started my studies, a PC as we know it today was just a dream. We used DEC VAX minicomputers, OS was VMS and languages we used Cobol and Fortran.

    In those days, late 70's and early 80's, the programming was taught in Finland using a so called pseudo language. First, before coding on computer, those dumb terminals we had, we did a pseudo code with pen and paper. The idea was simple, to write your code using a language mixed with instructions and commands from Cobol, and plain English. Afterwards it was surprisingly easy to transfer this pseudo code to correct Cobol, or Fortran.

    A simple example: You need to write a short program that asks user's name, and prints then "Hello <NAME>". First you take a block of paper, a pen and beer coffee, sit down and write the pseudo code:

    Code:
    PRINT "What is your first name?"
        INPUT firstname$
    PRINT "What is your last name?"
        INPUT lastname$
    name$ = firstname$ + " " + lastname$
    IF firstname$ = "Barak" AND lastname$ = "Obama"
        PRINT "Hello, Mr. President!"
    ELSE 
        PRINT "Hello, " name$
    END
    Now, just sit in front of your computer and simply translate the above pseudo code to correct Fortran, compile it and that's it.

    This method works extremely well with languages like Cobol and Fortran which have quite straight forward sets of instructions. I wholeheartedly recommend you to try when planning and coding your first Fortran apps. It's especially good method to see and plan which variables you are going to need.

    I like old languages, I still have my Pascal, Lisp, Fortran and Cobol books and reference guides. If you are looking for a solution, how to do something in Fortran, you are most certainly welcome to ask. I believe I am not alone here, we old geeks would be happy to point you to the right direction if need arises.

    Happy Coding!

    Life is good, Mac OSX sux!

    Kari
      My Computer


  9. Posts : 446
    windows 7 Pro 64Bit
    Thread Starter
       #9

    Maybe sometime in the future I'll be the only person who knows what the MITS Altair the Xerox Alto,the Apple Lisa or the Amiga was and how they paved the way for what we take for granted as a modern platform for computing is. Possibly a Historian is what lies in my future. But I still doubt a professional programmer, especially focusing on a dead tongue such as Fortran.
      My Computer


  10. Posts : 446
    windows 7 Pro 64Bit
    Thread Starter
       #10

    Kari said:
    profdlp said:
    Well, I can tell you from personal experience that there are a lot of people who are only studying programming because they think it's a ticket to a well paying job. Good for you for doing it for the love of the subject.


    When I started my studies, a PC as we know it today was just a dream. We used DEC VAX minicomputers, OS was VMS and languages we used Cobol and Fortran.

    In those days, late 70's and early 80's, the programming was taught in Finland using a so called pseudo language. First, before coding on computer, those dumb terminals we had, we did a pseudo code with pen and paper. The idea was simple, to write your code using a language mixed with instructions and commands from Cobol, and plain English. Afterwards it was surprisingly easy to transfer this pseudo code to correct Cobol, or Fortran.

    A simple example: You need to write a short program that asks user's name, and prints then "Hello <NAME>". First you take a block of paper, a pen and beer coffee, sit down and write the pseudo code:

    Code:
    PRINT "What is your first name?"
        INPUT firstname$
    PRINT "What is your last name?"
        INPUT lastname$
    name$ = firstname$ + " " + lastname$
    IF firstname$ = "Barak" AND lastname$ = "Obama"
        PRINT "Hello, Mr. President!"
    ELSE 
        PRINT "Hello, " name$
    END
    Now, just sit in front of your computer and simply translate the above pseudo code to correct Fortran, compile it and that's it.

    This method works extremely well with languages like Cobol and Fortran which have quite straight forward sets of instructions. I wholeheartedly recommend you to try when planning and coding your first Fortran apps. It's especially good method to see and plan which variables you are going to need.

    I like old languages, I still have my Pascal, Lisp, Fortran and Cobol books and reference guides. If you are looking for a solution, how to do something in Fortran, you are most certainly welcome to ask. I believe I am not alone here, we old geeks would be happy to point you to the right direction if need arises.

    Happy Coding!

    Life is good, Mac OSX sux!

    Kari
    Thanks for the example Kari, the code I've been playing around with today is...

    Program Hello

    Implicit None

    Character :: Uname*20, Uage*2, Ulive*30
    Print *, 'Enter Name'
    Read *, Uname
    Print *, 'Enter Age'
    Read *, Uage
    Print *, 'Where do you live?'
    Read *, Ulive
    Print *, 'Name : ', Uname
    Print *, 'Age : ', Uage
    Print *, 'Location : ', Ulive

    ! open file
    open (10, file='Result.txt', status='unknown')

    ! write to file
    write(10, *) 'Name : ', Uname
    write(10, *) 'Age : ', Uage
    write(10, *) 'Location : ', Ulive

    ! close file
    close(10)

    Print *, 'Results have been written to Result.txt'
    End Program Hello


    Takes input of name, age and location and prints results on screen as well as to a text file.
      My Computer


 
Page 1 of 3 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:05.
Find Us