Welcome to AE Resources
Converted document Converted document

FORTRAN 90+: LINE CONTINUATION DEMONSTRATION

The use of line continuations is demonstrated in the Theory section using snippets of code, as well as in an example below. Links to actual codes that use comments are found in the Examples section or can be found by visiting the Numerical Methods Section.
EXAMPLE
! Assume calorically perfect gas
gam_rat = SQRT(2.4/0.4) ! (gamma+1)/(gamma-1)
DO WHILE ((mr-ml) > 0.01)
   mm = (ml+mr)*0.5
   nm = gam_rat*ATAN(1./gam_rat*SQRT(mm*mm-1.0)) &
        -ATAN(SQRT(mm*mm-1.0))
         
   IF (nr > nm) THEN
       ml = mm
   ELSE IF (nr < nm) THEN
       mr = mm;
   ENDIF