Fortran 2008

From Bacliff Exploration Society
Jump to navigation Jump to search

Fortran 2008 is modern object-oriented programming language that is designed for computational efficiency. It is highly suited for scientific and engineering applications, and is the programming language most aerospace engineers should be using (but aren't).

Comparisons with other programming languages

Most engineers today have been mislead into believing that C and Matlab are superior to Fortran, in spite of the fact that C syntax is a horrible monstrosity created by hackers and that Matlab code runs about as fast as an 80-year old snail. Engineers are sometimes told that C++ is the programming language of the future, so they will sometimes try to start learning it. They soon discover that C++ is the unholy nightmare child of C created by Sauron, and quickly retreat back to C. Sometimes they will hack together C and C++ code and convince themselves that they understand what they are doing (see Trick), even though they don't.

Example

Adding the first n elements of two vectors (a and b) together, and replacing any negative values in the result with zero

c = a(1:n) + b(1:n)
where (c<0.0) c=0.0

See also

External links