Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kn92

macrumors newbie
Original poster
Nov 21, 2010
16
0
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
 
Can someone give me step-by-step instructions on how to code in Fortran, assuming all I know is the language.

https://forums.macrumors.com/posts/10990717/

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

$ cd ~/Documents
$ gfortran -o deleteme deleteme.f
$ ./deleteme

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

B
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.