Questions tagged [fortran77]

This tag is for questions which relate specifically to the Fortran 77 revision of the Fortran language. Questions with this tag would usually also be tagged with the general Fortran tag. This tag is rarely necessary as most concepts in Fortran 77 exist in all subsequent revisions with the same interpretation.

This major revision of is the predecessor of .

Fortran 77, approved as the new standard in April 1978, added a number of significant features to address many of the shortcomings of its predecessor, Fortran 66. Fortran 90 was the next approved standard after Fortran 77.

552 questions
63
votes
6 answers

Why define PI = 4*ATAN(1.d0)

What is the motivation for defining PI as PI=4.D0*DATAN(1.D0) within Fortran 77 code? I understand how it works, but, what is the reasoning?
ccook
  • 5,869
  • 6
  • 56
  • 81
43
votes
2 answers

Julia (Julia-lang) Performance Compared to Fortran and Python

I adapted a simple program to compute and plot the movement vortices of to Julia to test the language, I also wrote it in Python for no particular reason. (Disclaimer: 1. Every performance comparison on stackoverflow I read gets slammed for not…
SColvin
  • 11,584
  • 6
  • 57
  • 71
12
votes
1 answer

Fortran do loop with internal goto

I have a Fortran77 snippet that looks like this: DO 1301 N=NMLK-2,2,-1 Some code... IF(NB1(N).EQ.50) GOTO 1300 …
yu_ominae
  • 2,975
  • 6
  • 39
  • 76
12
votes
2 answers

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 compile f77 code? Does ubuntu already have a fortran compiler or do I need to download gfortran?
ilyas patanam
  • 5,116
  • 2
  • 29
  • 33
11
votes
1 answer

IEEE_UNDERFLOW_FLAG IEEE_DENORMAL in Fortran 77

I am new to Fortran and coding in general so I apologize if my terminology is not correct. I am using a Linux machine with the gfortran compiler. I am doing research this summer which involves me getting a program written in about 1980 working…
Robert
  • 111
  • 1
  • 1
  • 3
10
votes
1 answer

Comparing two strings in Fortran

What is the correct way to compare two strings say abc and bcd depending on the alphabetic order? Is there a built in command to do so? Or would > or .lt. do the work without any problems?
Huzo
  • 1,652
  • 1
  • 21
  • 52
9
votes
4 answers

Opening Binary Files in Fortran: Status, Form, Access

I have been working with Fortran for years, but the file I/O is still hazy to me. My understanding of status, form, access, recl is limited, because I only needed certain use-cases in grad school. I know that Fortran binary files have extra…
john_science
  • 6,325
  • 6
  • 43
  • 60
9
votes
1 answer

binary search efficiency vs. linear search efficiency in fortran

This question is about the efficiency of a linear search vs. the efficiency of a binary search for a pre-sorted array in contiguous storage... I have an application written in fortran (77!). One frequent operation for my part of the code is to find…
mgilson
  • 300,191
  • 65
  • 633
  • 696
8
votes
1 answer

Non-advancing read in Fortran with free format

I want to read a line in a file, which includes three real numbers, without advancing the pointer. So I wrote: (TXT is the variable representing my file which has a value of 80) read(TXT, *, ADVANCE='NO') (numbers(i),i=1,3) However, I got an error…
FalloutRanger
  • 127
  • 2
  • 8
7
votes
4 answers

Are FORTRAN 77 programs faster than Fortran 90 ones?

Today I was reading code from some very popular numerical libraries written in FORTRAN 77 such as QUADPACK (last updated in 1987), and I was wondering if there is any reason not to rewrite those libraries in Fortran 90 apart from the big amount of…
astrojuanlu
  • 6,744
  • 8
  • 45
  • 105
7
votes
4 answers

Array of Strings in Fortran 77

I've a question about Fortran 77 and I've not been able to find a solution. I'm trying to store an array of strings defined as the following: character matname(255)*255 Which is an array of 255 strings of length 255. Later I read the list of names…
Siu
  • 97
  • 2
  • 5
  • 9
7
votes
2 answers

How to install f77 on Mac OS X 10.6

Can anyone tell me how to install f77 on Mac OS X 10.6? I am quite new to f77. Thank you very much
Joe SHI
  • 1,734
  • 4
  • 20
  • 39
7
votes
1 answer

How to use Fortran statement labels well?

I'm working on a model written in Fortran 95, which I am completely new to. The concept of statement labels seems strange, and I've so far only found the explanation that the labels can be arbitrarily decided by the author, usually incrementing by…
ryanjdillon
  • 17,658
  • 9
  • 85
  • 110
7
votes
1 answer

Export custom formatted expressions from Mathematica

How can I get Mathematica to export/save/write a text file with proper Fortan77 formatting, that is, 72 columns and a continuation marker on the sixth column? I am using Mathematica to generate large and complex analytic expressions, which I then…
Timo
  • 4,246
  • 6
  • 29
  • 42
6
votes
2 answers

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 as I define the path for the file using environment variable "fileplace" #!/bin/bash fileplace="/home/vijay/data1/process-folder1/" cat…
Vijay
  • 965
  • 5
  • 13
  • 27
1
2 3
36 37