1* This file is an example to test the syntax highlighting file fortran-fixed.xml
2* (for fortran, fixed format)
3
4c <-- this is a comment in the old fortran 77 style (fixed form)
5c In the free form file, so we shouldn't use this kind of comments!
6c But fortran 90 still understands fixed form, when parsing sources with
7c the *.f extension.
8
9* this 'c' shouldn't be highlighted as a comment!
10 c
11
12*     Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7
13*         where j is the imaginary number sqrt(-1)
14
15      <beginfold id='1'>PROGRAM</beginfold id='1'> CMPLXD
16          IMPLICIT COMPLEX(X)
17          PARAMETER (PI = 3.141592653589793, XJ = (0, 1))               this text should be highlighted as a comment because it is after the 72th column (ignored by the compiler)
18          <beginfold id='2'>DO</beginfold id='2'> 1, I = 0, 7
19              X = EXP(XJ * I * PI / 4)
20              IF (AIMAG(X).LT.0) <beginfold id='2'>THEN</beginfold id='2'>
21                  PRINT 2, 'e**(j*', I, '*pi/4) = ', ! I am an in-line comment
22     *                     REAL(X), ' - j',-AIMAG(X) ! the character at the 6th column indicate a continuation line and should be highlighted as a continuation character
23              <endfold id='2'></endfold id='2'><beginfold id='2'>ELSE</beginfold id='2'>
24                  PRINT 2, 'e**(j*', I, '*pi/4) = ',
25     *                     REAL(X), ' + j', AIMAG(X)
26              <endfold id='2'>END IF</endfold id='2'>
27              FORMAT (A, I1, A, F10.7, A, F9.7)
28              CONTINUE
29          <endfold id='2'>ENDDO</endfold id='2'>
30          STOP
31      <endfold id='1'>END</endfold id='1'>
32