10.7.08

Fortran

So I ended up working (kind of) in FZU again, this time even doing something with Math, I am just lucky being given the possibility - already now, after the first year of the university! I just hope I don't get fired too early.
But this is not, what I wanted to write about. As the work I do has something to do with computational physics, I've had to learn a suitable programming language.
So far, I have put my hands more seriously on PHP (this was because of webdesign) and, of course Pascal (and I don't count Karel far back in the early secondary school :D. Still PHP is mostly - well, just for the webdesign - and Pascal, let's face it, have always been designed to teach students basics of programming. Oh, yes, and I remember some of those basic steps in Delphi and Java.. (Delphi again because of FZU - back then; Java because I wanted to see, what Meldath was creating in it all the time.)
First, I was hoping to have to learn C; still, not truly surprisingly in an institute of physics, I was told to learn Fortran. I've always been told it's a crazy language for crazy physicists. Well, it's definitely apparent, what is the purpose of the language, and intended audience. On the other hand, (to my surprise), there have apparently been quite some changes recently (no infamous FORTRAN 77 anymore). I actually came to acknowledge, something is really joy to program in it. E.g. it was really painful to do some more serious (from the viewpoint of a first-grader, of course) programming in the ancient Turbo Pascal. Yet in some of this stuff actually lies the Fortran's main power (I always thought Fortran was used just because of the vast number of libraries available - not true).
Let's see - the support for complex arithmetic is built inside by default. There is a pretty convenient system of handling "modules" (that means - user-built libraries). What I really love - the possibility to name every control structure in the code - and compiler will nicely localize errors for you this way. Possibility to handle new data types and defining arbitrary operators on them really easily. Lots of built-in mathematical functions - and easy-to-use libraries to provide another ones. No I don't say this is not possible to use these functions in other languages, just so far, the Fortran's way to do this is somehow most readily available. I just now don't like the idea of having to write the program in Pascal in order to get my Programming credit ;)

1 comment:

Anonymous said...

http://www.mikekong.net/Maths/maths-frame.php

http://www.mikekong.net/Maths/Gifts/ecards/postcard02/fractal01.jpg

http://www.mikekong.net/Maths/Gifts/ecards/postcard02/fractal09.jpg

http://www.mikekong.net/Maths/Gifts/ecards/postcard02/fractal12.jpg