0

I am trying to separate a long Fortran 90 program file written in BBedit with a defining break (currently a commented line of dashes). Preferably, I would run only the section between certain breaks, similar to what Matlab does with the code sections defined by &&.

I currently have something like:

! ----------------------------------------------------

! Section 1

real(8), parameter :: pi= 4.d0*datan(1.d0) ! pi

! do stuff...

! ----------------------------------------------------

! Section 2

complex(8) :: i ! Square-root of -1

! do stuff...

! ----------------------------------------------------

How can I run Section 1 without running Section 2 (or vise versa) without commenting a section out?

Rob A.
  • 21
  • 4
  • Use tag [tag:fortran] for all Fortran questions. Fortran 90 is just one old obsolete version. – Vladimir F Героям слава Jul 05 '17 at 22:56
  • Also, the code you show does not have anything you could *run*. It shows only definitions, executable statements. You can use a preprocessor for that, see many examples in https://stackoverflow.com/questions/tagged/fortran%20c%2b%2b Finally, note that real(8) and complex(8) (and direct numerical literal kind numbers in general) is ugly and not portable. – Vladimir F Героям слава Jul 05 '17 at 22:59

0 Answers0