SHJSというシンタックスハイライトJSのKuin用定義ファイルです。
<script src="sh_main.js"></script>
<script src="sh_kuin.js"></script>
<link rel="stylesheet" href="sh_style.css">
<body onload="sh_highlightDocument();">
<script>
$(function() { sh_highlightDocument(); })
</script>
<pre class="sh sh_html">
{Kuinのソースを記述}
</pre>
{
エラトステネスの篩
Author: きょんたん (@sukukyon)
}
func Main()
const N: int :: 100
var flag: []bool :: #[N]bool
for i(0, N-1)
do flag[i] :: true
end for
for i(2, N - 1)
if (flag[i])
do Dbg@Log(i.ToStr())
var j : int :: i
while (j < N)
do flag[j] :: false
do j :+ i
end while
end if
end for
do Kuin@Stop()
end func