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