program name | example of | description |
collinear.f90 | Algebraic equality and computational equality are different. | Determine if three points are collinear. |
triangle.f90 | Logical variables. | Check what type of triangle three sides form. |
newton.f90 | Iteration limited by convergence. | Newton's method applied to a 5th order polynomial. |
cards.f90 | Fixed-format I/O. | Read cards, compute simple stats. |
angles.f90
sample run |
Example of fixed-format I/O; How to redirect input. | Add angles in degree-minutes-seconds format |
fibonacci.f90 | Computation by iteration. | Compute the first so-many fibonnacci numbers. |
rocket.f90 | File I/O; Numerical integration. | Integratation over a sampled curve. |
daysofage.f90 | Functions and subroutines. | Find out how many days you've been alive, and when to celebrate your next 100th day. |
hotmetal.f90 | Array operations. | Steady state temperature on a hot plate. |
simplyrandom.f90 | Random numbers. | Call the pseudo random number generator. |
lionpushups.f90 | Simulation. | Simulate how many pushups the Nittany Lion might do (in 1994). |
ohare.f90
typical output |
Simulation. | Simulate arrivals and departures at an airport. |
laguardia.m
nexttime.m |
Simulation; matlab. | (same as ohare.f90). |
hoops1977.f90 | So-called 'menu driven program'; simulation; random numbers. | A sample of the types of computer games people played in 1977. |
morerandom.f90
inquisitor.f90 |
Futility. | Two examples of random number generation which fail miserably under ifc but run fine with other fortran compilers. |
1) script logfilename | Good names for this file are session.log or yourprogram.log. Do not use the name yourprogram.f90 or you will clobber your source code. Another poor choice is to use the same file name as you are going to tell the compiler to produce. |
2) cat yourprogram.f90 | This copies your source code to the console, and since you are capturing into a session log, your source file gets captured too. |
3) ifc yourprogram.f90 -o yourprogram | This compiles your source code, translating it into machine language. |
4) ./yourprogram | This runs your program. You may want to run it more than once, with different input values. |
5) exit | This closes the session log. |