Difference between revisions of "Fortran 2008"
Giantsquid (talk | contribs) |
Giantsquid (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== Comparisons with other programming languages == | == 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 is a horrible monstrosity and 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 | + | 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 == | == See also == | ||
* [[C++]] | * [[C++]] | ||
* [[Matlab]] | * [[Matlab]] | ||
+ | |||
+ | == External links == | ||
+ | * [http://bacliffexplorationsociety.org/blog/fortran-programming/ Bacliff Fortran Repository] |
Latest revision as of 23:52, 1 March 2014
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