| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight.v</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (V) - Theme (Breeze Light)"/> |
| 6 |
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre> |
| 7 |
<span style="color:#898887;">// Comment</span> |
| 8 |
<span style="color:#898887;">/**</span> |
| 9 |
<span style="color:#898887;"> * comment 2</span> |
| 10 |
<span style="color:#898887;"> */</span> |
| 11 |
<span style="font-weight:bold;">fn</span> main() { |
| 12 |
<span style="color:#0057ae;">mut</span> s := <span style="color:#bf0303;">''</span> |
| 13 |
<span style="color:#0057ae;">mut</span> str := <span style="color:#bf0303;">'asd</span><span style="color:#3daee9;">\n</span><span style="color:#bf0303;">'</span> |
| 14 |
<span style="color:#0057ae;">mut</span> str := <span style="color:#bf0303;">'asd </span><span style="color:#3daee9;">\'</span><span style="color:#bf0303;"> asd'</span> |
| 15 |
<span style="color:#0057ae;">mut</span> str := <span style="color:#bf0303;">"asd </span><span style="color:#3daee9;">\"</span><span style="color:#bf0303;"> asd"</span> |
| 16 |
<span style="color:#0057ae;">mut</span> ch := <span style="color:#924c9d;">`a`</span> |
| 17 |
<span style="color:#0057ae;">mut</span> n := <span style="color:#b08000;">1.2</span> |
| 18 |
<span style="color:#0057ae;">mut</span> d := <span style="color:#b08000;">12</span> |
| 19 |
<span style="font-weight:bold;">for</span> n <span style="font-weight:bold;">in</span> <span style="color:#b08000;">1</span> .. <span style="color:#b08000;">101</span> { |
| 20 |
<span style="font-weight:bold;">if</span> n % <span style="color:#b08000;">3</span> == <span style="color:#b08000;">0</span> { |
| 21 |
s += <span style="color:#bf0303;">'Fizz'</span> |
| 22 |
} |
| 23 |
<span style="font-weight:bold;">if</span> n % <span style="color:#b08000;">5</span> == <span style="color:#b08000;">0</span> { |
| 24 |
s += <span style="color:#bf0303;">'Buzz'</span> |
| 25 |
} |
| 26 |
<span style="font-weight:bold;">if</span> s == <span style="color:#bf0303;">''</span> { |
| 27 |
<span style="color:#644a9b;font-weight:bold;">println</span>(n) |
| 28 |
} <span style="font-weight:bold;">else</span> { |
| 29 |
<span style="color:#644a9b;font-weight:bold;">println</span>(s) |
| 30 |
} |
| 31 |
s = <span style="color:#bf0303;">''</span> |
| 32 |
} |
| 33 |
} |
| 34 |
</pre></body></html> |