Changeset View
Changeset View
Standalone View
Standalone View
autotests/html/highlight.f.html
- This file was added.
1 | <!DOCTYPE html> | ||||
---|---|---|---|---|---|
2 | <html><head> | ||||
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||||
4 | <title>highlight.f</title> | ||||
5 | <meta name="generator" content="KF5::SyntaxHighlighting (Fortran (Fixed Format))"/> | ||||
6 | </head><body style="color:#1f1c1b"><pre> | ||||
7 | <span style="color:#898887;">* This file is an example to test the syntax highlighting file fortran-fixed.xml</span> | ||||
8 | <span style="color:#898887;">* (for fortran, fixed format)</span> | ||||
9 | | ||||
10 | <span style="color:#898887;">c <-- this is a comment in the old fortran 77 style (fixed form)</span> | ||||
11 | <span style="color:#898887;">c In the free form file, so we shouldn't use this kind of comments!</span> | ||||
12 | <span style="color:#898887;">c But fortran 90 still understands fixed form, when parsing sources with</span> | ||||
13 | <span style="color:#898887;">c the *.f extension.</span> | ||||
14 | | ||||
15 | <span style="color:#898887;">* this 'c' shouldn't be highlighted as a comment!</span> | ||||
16 | c | ||||
17 | | ||||
18 | <span style="color:#898887;">* Prints the values of e ** (j * i * pi / 4) for i = 0, 1, 2, ..., 7</span> | ||||
19 | <span style="color:#898887;">* where j is the imaginary number sqrt(-1)</span> | ||||
20 | | ||||
21 | <span style="font-weight:bold;">PROGRAM</span> CMPLXD | ||||
22 | <span style="font-weight:bold;">IMPLICIT</span> <span style="color:#0057ae;">COMPLEX(X)</span> | ||||
23 | <span style="color:#0057ae;">PARAMETER</span> (PI <span style="font-weight:bold;">=</span> <span style="color:#b08000;">3.141592653589793</span>, XJ <span style="font-weight:bold;">=</span> (<span style="color:#b08000;">0</span>, <span style="color:#b08000;">1</span>)) | ||||
24 | <span style="font-weight:bold;">DO</span> <span style="color:#b08000;">1</span>, I <span style="font-weight:bold;">=</span> <span style="color:#b08000;">0</span>, <span style="color:#b08000;">7</span> | ||||
25 | X <span style="font-weight:bold;">=</span> <span style="color:#644a9b;font-weight:bold;">EXP</span>(XJ <span style="font-weight:bold;">*</span> I <span style="font-weight:bold;">*</span> PI <span style="font-weight:bold;">/</span> <span style="color:#b08000;">4</span>) | ||||
26 | <span style="font-weight:bold;">IF</span> (<span style="color:#644a9b;font-weight:bold;">AIMAG</span>(X)<span style="font-weight:bold;">.LT.</span><span style="color:#b08000;">0</span>) <span style="font-weight:bold;">THEN</span> | ||||
27 | <span style="color:#644a9b;">PRINT</span> <span style="color:#b08000;">2</span>, <span style="color:#bf0303;">'e**(j*'</span>, I, <span style="color:#bf0303;">'*pi/4) = '</span>, <span style="color:#0057ae;">REAL(X)</span>, <span style="color:#bf0303;">' - j'</span>,<span style="font-weight:bold;">-</span><span style="color:#644a9b;font-weight:bold;">AIMAG</span>(X) | ||||
28 | <span style="font-weight:bold;">ELSE</span> | ||||
29 | <span style="color:#644a9b;">PRINT</span> <span style="color:#b08000;">2</span>, <span style="color:#bf0303;">'e**(j*'</span>, I, <span style="color:#bf0303;">'*pi/4) = '</span>, <span style="color:#0057ae;">REAL(X)</span>, <span style="color:#bf0303;">' + j'</span>, <span style="color:#644a9b;font-weight:bold;">AIMAG</span>(X) | ||||
30 | <span style="font-weight:bold;">END IF</span> | ||||
31 | <span style="color:#644a9b;">FORMAT (</span>A, I1, A, F10.7, A, F9.7<span style="color:#644a9b;">)</span> | ||||
32 | <span style="font-weight:bold;">CONTINUE</span> | ||||
33 | <span style="font-weight:bold;">STOP</span> | ||||
34 | <span style="font-weight:bold;">END</span> | ||||
35 | </pre></body></html> |