Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
10 Views

Broken Dr Fortran Link

New post: Doctor Fortran in “Military Strength”

 

The link is broken.  

0 Kudos
8 Replies
Highlighted
Retired Employee
10 Views

Fixed - thanks. The correct

Fixed - thanks. The correct link is https://stevelionel.com/drfortran/2020/05/16/doctor-fortran-in-military-strength/

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
10 Views

END DO as the terminal

END DO as the terminal statement of a DO loop. This didn’t add the unlabeled block DO..END DO Fortran 90 would have, but it works with that.

Tahnks I have been meaning to ask why some one wanted this instead of continue.

0 Kudos
Highlighted
Retired Employee
10 Views

The goal was to get rid of

The goal was to get rid of labeled DO, which happened eventually in the standard (deprecated). DO..END DO is easier to understand. It also eliminates shared loop termination, which almost nobody understood.

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
10 Views

I hate common use of continue

I hate common use of continue statements to end do loops - it is common in old Fortran and can be a pain to eliminate.   But I dislike unnumbered do loops as they can be hard to read across multiple pages

We will never get rid of Old Fortran -- it is like old English -- we will live with it forever.  

 

0 Kudos
Highlighted
Valued Contributor II
10 Views

Well, you can use named loops

Well, you can use named loops (and in fact named constructs) as an alternative:

myloop: do i = 1,100

    ... a few hundred lines of code to do something useful
    enddo &
myloop

To make the end of the loop more visible I have put the label at the end on a new line.

0 Kudos
Highlighted
Valued Contributor II
10 Views

I also find that in many

I also find that in many cases where do enddo are a long way apart the code is in need needs of some restructuring with some subprogram units to make it more readable and maintainable

0 Kudos
Highlighted
Retired Employee
10 Views

I encourage the use of labels

I encourage the use of labels (the alphanumeric kind).

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
10 Views

There is a good rule that a

There is a good rule that a piece of code wider than your hand is to long

0 Kudos