FORTRAN and other languages

Discussion in 'Mac Programming' started by SirJ, Jul 16, 2008.

  1. SirJ macrumors member

    Apr 29, 2008
    hey, i'll be going to uni next year and have been visitng some schools this summer to check out some possibilities. One of my interests is engineering and for that you are required to take a class in programming. The area that I am interested in right now (aerospace) covers FORTRAN but others cover different languages such as C and visual basic (there are others as well but i can't remember them). Now, I've only dabbled in extremely basic (litteraly in basic) making like a simple calculator in 7th grade. Since then I've shelved most programming skills.
    Anyway, as I'll be going off to college I'll be wanting a computer and as a forced life-long PC guy I'll finally have the chance to get a mac. However, my question is, does OS X support these languages? Or at least (from what I remember) the compilers for the code? I'd rather not spend the money on Windows and Fusion/Parallels if avoidable.
    Thanks for your help everyone!
  2. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    You can get a Fortran compiler for Mac OS X if you want there is free one available, but the Intel one which is not free is meant to be better.

    The same is true for C (Xcode which is the Mac OS X free development environment comes with C, C++, Objective-C, Ruby, Python and Applescript).

    Visual Basic is not available for Mac OS X but I would suggest you use a different language instead. Python is much better than VB and is available on all major platforms including Windows, Mac OS X, Linux, Solaris, AIX and others.
  3. SirJ thread starter macrumors member

    Apr 29, 2008
    thanks a lot, that's pretty definitive. umm, i'm assuming from your post that I don't have to put fortran in caps? lol
    i should've added this in the first post and I'm also showing my ignorance level here but how powerful of a processor do you need to use these languages?
  4. lee1210 macrumors 68040


    Jan 10, 2005
    Dallas, TX
    For Fortran I recommend g95,

    Since Fortran 77, I believe, the language has been case insensitive. Before that you had to type in all caps for keywords. I think that's reason enough not to type the whole language name in caps. I just checked out the wikipedia entry and my understanding of this seems consistent with the general consensus.

    If you're programming in C or Fortran the compilers are very good, and the speed of your processor is not too significant at runtime. Compilation itself is very processor intensive, but while you're learning it is unlikely that you'll be building thousands of files at a time on a regular basis. Any modern CPU should be fine. Anything that can reasonable run OS X will be more than enough for your compilation and execution of programs while you're starting out and I'm sure well in to your programming experience.

    Engineering fields will generally welcome UNIX over or along with Windows, so using a Mac with OS X should not preclude you from anything but .NET (though with mono it's possible), Visual Basic, or other Windows-specific (Win32, COM) tasks.

  5. yeroen macrumors 6502a


    Mar 8, 2007
    Cambridge, MA
    Fortran is, or at least was, part of the standard engineering curriculum. Most engineers and scientists are (were) required to take a semester of 'Scientific Computing', which basically means a straightforward transliteration of whatever numerical and approximation techniques you learn in calculus. Advanced courses at the upper or graduate level will cover numerical PDE's, finite element methods, etc.

    Matlab is very prominent these days in the Engineering and Applied Science curricula and in industry, so expect to be learning how to use Matlab within your first year.

    If you're doing Aerospace, be at least aware of Ada. Ada is still very big in aerospace and defense. Ada's niche is real time and embedded systems. Most avionics systems are implemented in Ada, with C++ coming in second.
  6. Am3822 macrumors 6502


    Aug 16, 2006
    Groningen, The Netherlands
    Fortran, F.E.M.

    There's a free intel fortran compiler for students (I don't remember the exact URL, though). As for the free fortran compiler, gfortran (and not g95) is a part of the gnu compiler collection and is sort-of supported by Xcode (hopefully they'll update the gfortran XCode-plugin soon). While we're at it, I've read that Absoft's fortran compiler plays nicely with XCode 3.1 and even allows debugging from within XCode, but I have no first-hand experience of it.

Share This Page