![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Sep 2005
Location: Oopland
Posts: 36
Rep Power: 0
![]() |
Fortran!
I am going to transfer into UCLA next year and get my degree in Mechanical Engineering. Now, one of the course required is Fortran. Yay, I get to program.
HOWEVER, I don't know much about this language, other than the fact that it's used by mathematicians and, obviously, engineers. Can anyone point me to a lamenst terms tutorial and explanation of it? I found the main site to be less than helpful.. Also, can anyone give me some sample programs I can try out that don't require me to have anything expensive or complicated to test them with? Maybe some tutorials? Thanks! BLARG! |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,261
Rep Power: 5
![]() |
I first learnt Fortran in the mid 80s, so have never used an online tutorial. Googling for "fortran tutorial" turned up a lot of hits. You might wish to try the same.
Fortran compilers tend to be relatively expensive (as they're typically developed for a small community [compared with other programming languages] and that community is often focused on numerical performance; that combination usually demands a fairly good quality compiler and that comes at a cost). There is a free Fortran 77 compiler (named g77) bundled free with the gnu compiler collection (gcc) which can be downloaded free (although it's a big download). When I last used it (10 years back) g77 was still developmental, but was emerging as a reasonable quality compiler that was picky on standard compliance. I heard a rumour that watcom fortran 77 and maybe 90 binaries had been released to the public domain, but never confirmed that. Otherwise, I'm not sure offhand if there are free compilers for fortran 90/95/2000/etc. |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I have Salford FTN95 with the Plato IDE. It is for Windows and the personal edition is free for non-commercial use. Check here.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Sep 2005
Location: Oopland
Posts: 36
Rep Power: 0
![]() |
I did a quick google before writing the post, although I didn't see a too many things which I liked..
I am currently downloading FTN95 as DaWei suggested. I'll go about finding some tutorials now... Is Fortran a difficult language to learn? Any opinions on that? Edit: And what is up with all these numbers? Gawd damd. Can anyone explain why Fortran has all these blasted numbers like 90, 77, 200, etc. Last edited by White-Hat`; Feb 23rd, 2006 at 6:51 PM. |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
They represent the year of major changes/versions. I first used Fortran in the late 60s. Obviously, there's been plenty of technological change. My most recent use of it was to illustrate cross-language usage -- calling a Fortran function from C and vice-versa.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
This thread inspired me to bring Fortran back into play from several years of disregarding it. Even picked up a Fortran book today.
![]()
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Sep 2005
Location: Oopland
Posts: 36
Rep Power: 0
![]() |
Nice Infinite.
![]() Okay, well that solves some of my questions. Now, from what I can tell, the latest I can find which is for free is 95. Will that harm me any? Meaning obviously I can't use functions from the 2000, 2003, etc versions. Will that make too big of a difference? |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I only have the one I mentioned. For learning purposes, I don't see any problems with an earlier version. If you plan on using it commercially and professionally, it's a different story. '77 for the VAX and '77 for the PDP-11 (machines by the same company, DEC) were incompatible in many ways. It's one of the things, in addition to the wives and teens, that gave me gray hair.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,261
Rep Power: 5
![]() |
As to the question of whether Fortran is easy to learn or not. Fortran 77 is probably easier than most (other than Basic) IF you have a fair understanding of mathematics and are doing mathematical or numerical work --- because it is designed to support such things. It would be a bit of a bugger if you're used to programming in another language or want to do things that language isn't designed for (you can do anything you want in Fortran, with the right techniques and libraries, but it is not necessarily the easier choice over other languages).
Later versions of Fortran (standards of 1990 and beyond) include features to better support "modern" styles of programming. Which would mean learning Fortran is of similar difficulty to any other language. The key to difficulty in learning will be personal approach: eg some people get hung up in details of syntax (which would make C++ much more difficult to learn than Fortran) and others get hung up in the concepts for using the language better (which can make Fortran more difficult to learn, because effective use of modern Fortrans requires a mix of mathematical skills and more "general purpose" programming skills --- specialist mathematicians will get hung up on the "general programming" skill requirement, while most "general purpose programmers" will find the mathematical knowledge required difficult to pick up). One of the joys of trying to learn something from the internet is that, even more than with textbooks, you get a mix of the good with the bad. Fortran has been around for a while, so most people who know it well probably didn't learn it from a web page or only used a web page for getting updates (eg I learnt Fortran 77 before there was any Fortran material online (there was not really an internet as such), and only later used the web for pointers when learning F90 and later). So the best advice I can offer is to find a few links that you think are OK, and post the URLs here. Then people here who know anything about Fortran can critique them and advise if they are useful for novices. Keep in mind that people here are volunteers though: if you ask for us to review a 300 page document, it would take time (and not all will be inclined to) --- so the "review" might be a skim of a couple of sections only. I realise that requires work from you, but may be the best way to get useful advice. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|