answersLogoWhite

0

Unlike many programming languages that generally support for-loops, while-loops and until-loops or some variant of the three, FORTRAN has only one loop structure: the do-loop, which corresponds to a for-loop.

The general form of the FORTRAN do-loop is as follows:

do label var = expr1, expr2, expr3statements

label continue

Where, var is the control variable (or loop index), expr1 is the initial value of var, expr2 is the terminating bound of var, and expr3 is the increment of var. The label must be an unique integer value (usually labels begin at 10 and increment by 10 for all subsequent labels), and denotes the end of the statement or statements that constitute the loop body.

Modern variants of FORTRAN also allow the use of an end do statement which permits the label clause to be omitted completely.

Although FORTRAN has no concept of either a while-loop or an until-loop, these loops can be simulated using label, if and goto statements:

while-loop:

label if (logical expr) then statementsgoto labelendif

until-loop:

label continue statementsif (logical expr)goto label

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is a while loop known as?

A Looping Structure


Why is the FOR structure used for looping?

The FOR structure is used for looping to define the variable, define the conditions and then explination of what will be done to the variable. It is used for arrays to help run a code a set number of times.


Why FOR loop structure used for looping?

The FOR structure is used for looping to define the variable, define the conditions and then explination of what will be done to the variable. It is used for arrays to help run a code a set number of times.


What are the differences between looping structure and conditional structure?

A conditional structure takes out of possible multiple paths given a condition. A looping structure, on the other hand, repeats the same steps while a specific condition is still met. Examples: Conditional: if (x 5) //do action end while


Is the decision logic structure the instruction that allows different actions depending on the looping process?

No.


What does Fortran 4 mean?

Fortran IV was a version of the Fortran programming language developed in the 1960's. It was widely accepted as a standard version of Fortran until the development of Fortran 66 which was itself largely based on Fortran iV.


What did they program with fortran?

Not what did they program in Fortran, but what do they program in Fortran. Math. And lots of it. It is used in science and engineering applications for number crunching. It still is used, and in fact, it is the preferred language in finite element analysis programming and other work involving large amounts of calculation.


What Was the first high-level programming language designed that could perform complex?

fortran


What is looping statement?

What is looping statement?


What are BASIC and FORTRAN?

BASIC and FORTRAN are computer programming languages.


What is the difference btw fortran 77 and fortran 90?

23 years.


Why recursions are not possible in fortran 77?

Mainly because there is no stack in Fortran 77.