Fortran and mac

Discussion in 'Mac Programming' started by kn92, Dec 13, 2010.

  1. kn92 macrumors newbie

    Joined:
    Nov 21, 2010
    #1
    Hi, I don't have much programming experience, I only know python now, all I can do is type "python" in terminal and write.
    Fortran doesn't work this way. I've downloaded gfortran-4.2.3, gfortran-snwleo-intel-bin, and gfortran-macosx-x86. but nothing happens after I open the installation package.
    Can someone give me step-by-step instructions on how to code in Fortran, assuming all I know is the language.
    Thanks
     
  2. ign macrumors member

    Joined:
    Mar 16, 2004
    Location:
    Firenze
    #2
    I found this page pretty helpful :
    http://hpc.sourceforge.net/

    but since I also have ubuntu installed on my hd, I simply use gfortran on ubuntu's terminal, I found it easier to figure out and use.

    good luck
     
  3. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #3
    http://forums.macrumors.com/showpost.php?p=10990717&postcount=28

    Presume you have installed gfortran correctly and have a fortran program in ~/Documents/deleteme.f. Open Terminal.app and enter:

    This will get you to "Hello World!" or the simple 1 file code of your choice.

    B
     

Share This Page