Reverse Loop

Description: Takes an incrementing or decrementing loop, swaps the lower and upper bounds, and negates the step.

State: Implemeted         Author:  Ashley Kasza      Version:   Photran 7.0

Code Example:

    program main

    integer :: i

    do i = 1,10,2
         print *,i
    end do

end program main

   program main

   
integer :: i

    do i =10, 1,-(2)
        print *,i
    end do


end program main


ScreenShots

      

HTML Comment Box is loading comments...