Top "Fortran" questions

Fortran is a general-purpose, procedural, imperative programming language that is especially suited for numeric computation and scientific computing.

Fortran intrinsic timing routines, which is better? cpu_time or system_clock

When timing a FORTRAN program i usually just use the command call cpu_time(t). Then i stumbled across call …

timer fortran
What advantages does modern Fortran have over modern C++?

I'm trying to decide between Fortran and C++ for an application in scientific computing. It's not clear to me if …

c++ fortran language-comparisons
Fortran: initializing of and assigning value to arrays

To initialize and assign value to arrays in Fortran we do as the following: Initializing: real(kind=8):: r(3,4) ... r(:,:) = 0.0_8 what …

arrays fortran assign
defining path for file in FORTRAN

In bash I could write a simple script like below; to read the content of a file in the folder …

fortran fortran90 fortran77
Standard input and output units in Fortran 90?

How can I read and write to the standard input, output and error streams stdin, stdout and stderr in Fortran? …

fortran stdout stdin stderr fortran90
gfortran for dummies: What does mcmodel=medium do exactly?

I have some code that is giving me relocation errors when compiling, below is an example which illustrates the problem: …

memory-management fortran x86-64 gfortran
changing array dimensions in fortran

There are basically two ways to pass arrays to a subroutine in Fortran 90/95: PROGRAM ARRAY INTEGER, ALLOCATABLE :: A(:,:) INTEGER :: N …

fortran
Converting a string to an integer in Fortran 90

I know that IACHAR(s) returns the code for the ASCII character in the first character position of the string …

string integer fortran character fortran90
How can gfortran tell if I am compiling f90 or f95 code?

I understand gfortran can compile f90 or f95? How does it know which one it is compiling? Also can it …

fortran fortran90 gfortran fortran77
Reading a character string of unknown length

I have been tasked with writing a Fortran 95 program that will read character input from a file, and then (to …

input fortran character string-length fortran95