Fortran in 100 Seconds

Maybe the author is used to Python where one may define and use variables «on the fly», but the example to loop with

program myApp

   implicit none

   do n = 1, 10
      doubled = n*2
      print *, doubled
   end do

end program myApp

won’t work.

loops

1 Like