Fortran Wiki
Code (Rev #27)
Source Code on the Fortran Wiki
All code on the Fortran Wiki is in the public domain unless otherwise noted.
To contribute Fortran source code, add a link here to the filename (without extension), program, or module name, and create the new page by pasting the code, wrapping it in a fenced code block with a language keyword. See the HowTo and existing pages such as hello for examples.
- allocate_coin_toss - dynamic memory allocation example.
- d2u(1f) - example of stream I/O; this program converts clear ASCII text files between Unix and DOS line terminator conventions.
- fdate - example use of DATE_AND_TIME(3f)
- gen_list - a generic linked list example.
- hello - hello, world in Fortran 90.
- init_seed - random number generator seeding example.
- interface_mod - an example of defining interfaces in a module.
- internalproc - internal procedure example.
- inv - matrix inversion via LAPACK.
- kiss64 - a 64-bit random number generator by George Marsaglia.
- mm_ioutils - a library for easier I/O in Fortran.
- notab(3f) - expand tab characters in input lines
- notopen(3f) - find unused file unit number
- pointer_example - an example of pointer usage.
- readline - calling the GNU C routine readline(3c) using the f2003 ISO_C_BINDING module.
- proc_component_example - procedure component example.
- stderr(3f) - example of writing to "stderr"
- strnum - example illustrating conversion of numeric values to strings and vice-versa.
- strtok(3f) - read tokens from a line in a manner similar to the C routine strtok
- ttee - a "timed tee" – write stdout to stdin and another file with an optional date/time prefix.
- transfer_ex - example of the transfer intrinsic.
- use_test - an example of nested use statements
Code Available Elsewhere
This section lists individual modules, programs, and procedures, typically single files or perhaps zip files. See the Libraries page for more comprehensive collections of routines.