Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Programming in Fortran

17 Apr 2011   #1

windows 7 Pro 64Bit
 
 
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 System SpecsSystem Spec
17 Apr 2011   #2

Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
 
 

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 System SpecsSystem Spec
17 Apr 2011   #3

Several, including Windows 7 x64 Ultimate
 
 

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
My System SpecsSystem Spec
17 Apr 2011   #4

windows 7 Pro 64Bit
 
 

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 System SpecsSystem Spec
17 Apr 2011   #5

Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
 
 

Quote   Quote: Originally Posted by nitroman84 View Post
...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 System SpecsSystem Spec
17 Apr 2011   #6

windows 7 Pro 64Bit
 
 

Quote   Quote: Originally Posted by profdlp View Post
Quote   Quote: Originally Posted by nitroman84 View Post
...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 System SpecsSystem Spec
18 Apr 2011   #7

Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
 
 

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 System SpecsSystem Spec
18 Apr 2011   #8

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Quote   Quote: Originally Posted by profdlp View Post
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 System SpecsSystem Spec
18 Apr 2011   #9

windows 7 Pro 64Bit
 
 

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 System SpecsSystem Spec
18 Apr 2011   #10

windows 7 Pro 64Bit
 
 

Quote   Quote: Originally Posted by Kari View Post
Quote   Quote: Originally Posted by profdlp View Post
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 System SpecsSystem Spec
Reply

Thread Tools



Similar help and support threads for2: Programming in Fortran
Thread Forum
Windows7 and Army Gold Master program conflict with FORTRAN executable Software
C++ Programming Chillout Room
Programming Chillout Room
Programming Language Software
Top 50 Programming quotes Chillout Room
can't install Visual Fortran again Software
Programming Help - Please! Chillout Room

Our Sites

Site Links

About Us

Find 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 01:06 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33