What is Fortran: Definition and 875 Discussions

Fortran (; formerly FORTRAN, derived from Formula Translation) is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.
Originally developed by IBM in the 1950s for scientific and engineering applications, FORTRAN came to subsequently dominate scientific computing. It has been in use for over six decades in computationally intensive areas such as numerical weather prediction, finite element analysis, computational fluid dynamics, geophysics, computational physics, crystallography and computational chemistry. It is a popular language for high-performance computing and is used for programs that benchmark and rank the world's fastest supercomputers.Fortran has had multiple versions, each adding extensions while largely retaining compatibility with prior versions. Successive versions have added support for structured programming
and processing of character-based data (FORTRAN 77), array programming, modular programming and generic programming (Fortran 90), high performance Fortran (Fortran 95), object-oriented programming (Fortran 2003), concurrent programming (Fortran 2008), and native parallel computing capabilities (Coarray Fortran 2008/2018).
Fortran's design was the basis for many other programming languages. Among the better-known is BASIC, which is based on FORTRAN II with a number of syntax cleanups, notably better logical structures, and other changes to work more easily in an interactive environment.As of June 2021, Fortran was ranked 17th in the TIOBE index, a measure of the popularity of programming languages, climbing 17 positions from its ranking of 34th in January 2020.

View More On Wikipedia.org
  1. 5

    Fortran Gaussian Elimination in Fortran

    Hi, I am trying to recreate the naive gauss elimination method in fotran 95 but am having a few problems with it. The idea is to read in a nxn matrix of equations, so you can type in any number when u start the program and then the program will ask you to enter the relavant amount of...
  2. T

    Fortran Find Area Under Curve w/ Fortran Riemann Sums

    Hello, for my FORTRAN class it wants me to use the method of Riemann's sums to find the area under the curve for the function f(x) = -(x-3)**2 +9, and stop when successive iterations yield a change of less than 0.0000001. I know I am going to have to used double precision. I am just confused...
  3. C

    Fortran Fixing Fortran 77 Output Bugs with Negative Exponents

    I recently inherited some legacy code written in fortran77 which I'm going to be modifying quite a bit, and at this stage I find that I'm continually getting stuck on small fortran quirks... Just wondering if I could get some advice on this particular problem. I'm outputting the values of...
  4. E

    Fortran What is causing issues with WRF and Fortran compilation?

    Dear all, I am having some problems with WRF and Fortran. When I compile a software I got the following result: PGF90-S-0072-Assignment operation illegal to external procedure vfnsew. real (8) mm_vfnsew(mw,mw) real (8) vfnsew, vf_n_s, vf_e_w, vfns_f, vfns_s, vff_ns, vfew_f...
  5. N

    Fortran Understanding Fortran 90 Arrays and Variables: A Few Simple Questions

    Hey all! I have a few simple questions but they have been wrecking my head for a while now, for Fortran 90: 1. I have the following Complex (Kind=pr), Allocatable :: U(:,:,:) Does that mean that U is a complex array? And if so, I thought a complex number in Fortran is followed by an...
  6. M

    Fortran How to Read in Execution Flags in Fortran

    Hi All, Just like to know if it's possible for a Fortran program to read in data on execution. For example, in JAVA, say if I've written a program for matrix factorization, I can type in the command line: "java mfact q" for QR factorization or "java mfact c" for Cholesky...
  7. B

    Fortran FORTRAN ?: Trying to bypass significant slowdown

    I have experienced a serious program execution slow down and traced its source to one calculation...pseudo code below: do a=0, 360, 10 do b=0,85,5 do c=0,360,10 do d=0,85,5 bunch of calculations involving double precision real variables (stored in variable ele)...
  8. A

    Fortran Fortran 90 & elements array comparaison

    Dear all, I'm trying to figure about an efficient way to to get the redundant element in my array. For instance, let's take the array [0,2,3,0]. I'd like to get out [2,0,3] (or 3,0,2 it doesn't matter). So it find out which element is duplicated, an puts its value in between the 2 other...
  9. N

    Fortran How can you write sgn[Im(z)] in fortran?

    How can you write "sgn[Im(z)]" in fortran? Hello everybody; How can you write "sgn[Im(z)]" in fortran? , then what do you need to add in the header? also what does "sign(a,b)" mean? Much Thanks in advance
  10. A

    Fortran What Does the Fortran Statement 'IF ( IP - I1 ) 180, 170, 180' Mean?

    Hi all, What is the meaning of the following Fortran statement IF ( IP - I1 ) 180, 170, 180 kindly help, thank u,
  11. P

    Comp Sci Maximizing Rectangle Surface Area with Fortran Squares

    Homework Statement Hi, I have to do a project in Fortran based on solving a system. My professor mentioned one idea to me, I am trying to see if this idea is even feasible and some potential ways to progress through it before I submit a project proposal to do it. The problem is based on...
  12. N

    Fortran What dose d-8 mean in Fortran?

    What dose "d-8" mean in Fortran? Dear friends; What dose "d-8" mean in Fortran? Thanks
  13. N

    Fortran Does Allocating a Pointer in FORTRAN Give it a New Address?

    Hi all. When I have the following code in FORTRAN: integer, pointer :: ptr ALLOCATE(ptr) then does "ptr" receive a new address (i.e. do we have "ptr => <new integer>") or does the pointer retain its address (i.e. we don't have "ptr => ...")?
  14. fluidistic

    Fortran Is it possible to take advantage of a multicore processor for fortran?

    I have a dual core processor (intel) but I think that fortran programs only uses 1 processor. Can Fortran use both processors to calculate faster?
  15. A

    Fortran Fortran locate symbol in data file

    I need to look for the presence of '////' in my data file i could read it as character since i need to eliminate them from the file, I've tried to avoid them using if(xx .eq. '////') then but is not working the error comes as if(mt.ne. '////')then...
  16. A

    Fortran Fortran; Calling an executable that in turn runs an input file

    Hi. I need to write a fortran program that calls an EXE, call it "runner.exe" that in turn runs an input file, call it "run.inp". Thing is, I would normally run "runner.exe" manually, and type in "run.inp" and "runner.exe" gives outputs. But now, I have 100's of input files and I can't affod...
  17. G

    Fortran Find peak in the historgram data file - FORTRAN

    Hello guys, I have a file with X Y values (separated by space) I want to scan the data to find the PEAK in the file. (It will probably be a lowest Y point...) How do I do this is Fortran? Thank you, Alexander
  18. V

    Fortran FORTRAN, open several files and read it

    Hi pals I'm using fortran program to open several files like iso1.dat,iso2.dat... iso9.dat withis this files are number that I can read with my program, but I don't know how can I open the files above and then read it this is my simple code implicit real*8(a-h,o-z)...
  19. S

    Fortran Fortran 95 Help ( Compiling errors)

    Hello all, I'm kinda stuck with this fortran 95 program I have to write. It is an Infinite Series of SIN. IMPLICIT NONE ! ! Data Dictionary REAL :: x ! Measurement of angle in degrees REAL :: result ! facilitates addition of the functions REAL :: f_x ! function defining the series REAL...
  20. S

    Heard about the software Fortran

    Hello, I just heard about the software Fortran but i know nothing about it. I heard it is better than Matlab when dealing with numerical methods. Is it easier to use than Matlab?
  21. M

    Fortran What is the solution for skipping the last line in a FORTRAN program?

    Hi, I am an newbie programmer and I need some help with modifying a code in fortran. This program is supposed to skip the first two lines and the last line of the sample data and then extract only the date from the date column and write it to and output text file. The program I have now manages...
  22. A

    Fortran Fortran, complex array with rank one

    I'm using the MATMUL command to multiplicate two arrays: array A is of rank one and has three complex elements, while array B is a 3x3 matrix with complex elements. However, the compilation is aborted because "the shapes of the array expressions do not conform". I'm pretty sure that the...
  23. T

    Fortran How Can I Define and Use Very Small Numbers in Fortran 90?

    how do I define and use small numbers for computations? on the scale of 10^-30? e.g. Program A implicit none double precision a,b,c,d c = (a*b)/(a+b) d = etc... End program The above has an overflow error when I give a,b the values 3.345 * 10^-27 Can anyone help? Thanks Ising
  24. C

    MATLAB Using Matlab functions in Fortran -

    Hello, My work is on numerical techniques which require to solve sparse matrices etc. All my work is in fortran and I have almost no skill in Matlab.But I have just realized that Matlab can do some computations quite easily with its built-in functions and I want to take advantage of this. I...
  25. D

    Fortran Understanding the Relationship Between F# and Fortran in the .NET Framework

    Is F# fortran for .NET? My roommate seems to be under the impression that it is something like that. But I can't find any clear info on it's relation to Fortran.
  26. S

    Fortran Passing variables between subroutines in different files using Fortran

    Good day, I'm modifying a Monte Carlo program (MCCCS Towhee) using Fortran and am having trouble passing an argument (a 2x1 array) from a subroutine withing one file (the existing main loop that 'drives' the code) to another subroutine written in another file (an energy calculation, also part...
  27. A

    Fortran Reading formatted input in fortran

    format statement to read input in fortran hello everyone, I've to read this following line in fortran, I don't know to read the exponential form please help me 3.49E+03 2.73E+01 2.01E-01 9.16E-02 5.94E-02 5.11E-02 3.27E+04 3.27E+04 can somebody help me to write the format...
  28. J

    Fortran Fortran 90 help reading from file

    Hi All I'm completely new to Fortran 90 and I have to create a program that opens a formatted data file and reads in certain values into my program's variables. The variables are represented in the first six rows with ncols, nrows, xllcorner, yllcorner, cellsize and NODATA being the...
  29. A

    Fortran Fortran question, read from file

    Hello. I'm completely new to programming, and I'm having some troubles with a Fortran program I'm writing. I have an input file containing three columns, where each column contains a couple of cartesian coordinates (column 1 contains various x coordinates, and so on). What I would like my...
  30. T

    Fortran How do i 'relabel' variables (in fortran)

    Suppose I have a global variable like "GauntCoefficients".. and I want to use it in a formula in the next block of code. In C++, I might do something like this to make the code more readable: const int* gc = GauntCoefficients; (then write some nasty formula with "gc" rather than...
  31. Q

    Fortran Fast connection between fortran 77 and 90

    Hi! I'm having kind of a "little" problem. I got an old program written in Fortran77 and I want to implement some functionality from Fortran90 routines. The routines are quite long, so I'm not able to rewrite them in F77... Is there a possibility to connect the routines so that they can...
  32. Y

    Fortran Is it possible to call shell commands from a Fortran program?

    Hello! I'm new here and I was wondering if anyone could help me. I've a program in fortran which I want to combine with Matlab, both working in Ubunt 7.10 but I don't want to use mex-functions or MATLAB engine functions because it could cause damage to the fortran program I'm using. I was...
  33. Z

    Fortran Fixing Fortran DO Command Errors for Visual Fortran (f90)

    I am working with visual Fortran (f90 I believe) I have the following program and it says that I have 2 errors. I have narrowed it down to having something to do with my loop statement in bold. Is there something wrong that I'm not getting? program exercise1 implicit none...
  34. Z

    Comp Sci How to Open a Command Window for Fortran 90

    I feel very silly for asking this but I have just downloaded Fortran 90 and am trying to figure out how to open the command window. I am used to using MATLAB which automatically opens a command window when you open the program. I have the option of opening the developer studio or the command...
  35. E

    Fortran Reading MS Excel Files in FORTRAN 77

    Dear Members, How can I read an MS Excel created csv or tab delimited file in FORTRAN 77? The two tab delimited and csv files are attached. Thank you, Ekin
  36. J

    Fortran Compling of Fortran file aborted

    Hi I want to sort the data in output file by Fortran transfer file. when I do ./transfer<output>data1 It gives an error message: invalid number: incomprehensible list input apparent state: unit 5 (unnamed) last format: list io lately reading direct formatted external IO Aborted can...
  37. K

    Fortran Fortran Compiler and C Preprocessor

    I am very new to programming and am trying to determine if a Fortran compiler and C preprocessor is a property of the specific computer one has or if it is something that can be downloaded? Specifically I want to run the Neutron transport code, DANTSYS; system requirements are listed here...
  38. J

    Fortran Learn Fortran Programming: Compaq Visual Fortran 6 Options

    Hello, Currently I am using compaq visual fortran 6 to learn fortran programming. I am very beginner on this so I really confuse about how to use it. Can anyone tell me which option I should choose from the following attached image, to start writing some fortran code...
  39. C

    Fortran Fortran 90 Replace Text on Screen - Andy's Question

    Hello. In producing screen output from Fortran, I use the write statement. Back in the day, there was a way to use the FORMAT statement to allow you to replace text on the screen with different text. For example, counting up percentage complete of a process or something like that. Well...
  40. R

    Fortran How can I read and write 3D arrays in Fortran?

    Hi! I have a 3D array u(n,m,2), where n=2000, m=200 are the xy-coordinates, and u(n,m,1) and u(n,m,2) store values of variables a and b computed at the coordinates. (not very familiar with fortran I/O for arrays, when new lines are started, etc). I'd like to output this array into a...
  41. G

    Fortran Can software parallelization in Fortran reduce CPU usage and execution time?

    hello i have intel core 2 quad and my operating system is windows,every time i execute my fortran code it takes 8 hours to finish and just 25% of my cpu is used during the run(cpu usage=25%),it means just one core of my processor is used,so is there any way that i can use all the 4 cores of my...
  42. K

    Fortran Fortran Program Test: How to Change Line in File

    program test open(50,file='test.dat') write(6 ,FMT='(I3,/)') 111 WRITE(6 ,FMT='(I3,/)') 222 write(50,FMT='(I3,/)') 111 WRITE(50,FMT='(I3,/)') 222 close(50) end In the above, at the screen i see: 111 222 but in the dat file i see: 111222...
  43. M

    Fortran Creating a Graphical Interface for FORTRAN Programs: Tips and Tools

    Hi guys, I am fairly competent at programming scientific FORTRAN programs (from the CFD world). A friend of mine asked me to help him develop a program which he says will help him in his profession greatly. The backend calculations are incredibly easy. However, what I need to do is this: 1)...
  44. K

    Fortran Fortran Help, Please. Waiting online.

    The "multiplication (*)" in the group is simply performing them after one another. Take 6 coloured balls. Permute the first and third one. Now permute the third and fifth one (note: by third one I mean the one in the third position, not the third ball which is not in the first position). You...
  45. A

    Fortran Fortran Program Doubt: Plotting DST Index Values

    i have written a program to plot dst index values using fortran + pgplot, read the input as formatted input when I'm trying to plot the data points are not plotted correctly. k = 0 do i = isdt, iedt --------------start date to end date do j = 1,24...
  46. U

    Fortran Sequential File output in Fortran

    Hello, I am currently using a Fortran program to run a simulation which involves an explicit differentiation loop. The program currently plots simulation data at specified time intervals using a subroutine with another program. I'd like to have the program also output data files at these...
  47. M

    Fortran Compaq Visual Fortran: Does it Have IMSL Library?

    Hello, I have one questions. Does Compaq Visual Fortran have IMSL library? I tried to compile program which use MSIMSLMS module but program said that did not found the module. Thanks, Marden
  48. K

    Fortran Understanding Permutations in Fortran Programming

    Is there anyone familiar with Fortran programming, who can give me some ideas how can I strart this? Many thanks Take 5 colored balls(1,2,3,4,5). The "multiplication" in the group is simply performing them after one another. Permute the first and third one. Now permute the third and...
  49. K

    Comp Sci Computional Methods Problem with Fortran programming

    Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks Data Structures - The Permutation Group In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
  50. K

    Comp Sci Computional Methods Problem with Fortran programming

    Is there anyone familiar with Fortran programming, who can give me some simple ideas or resources how can I strart this project? Many thanks Data Structures - The Permutation Group In this project, the group of permutations on N elements (where N is probably fairly small, perhaps N= 9 or...
Back
Top