<script type="text/forth">
: fib2 1 1 begin over . swap over + dup 20000 > until 2drop ;
</script>
<p>9*9:</p>
<p class="forth" forthcode=": x 9 for cr r@ 9 for dup r@ * 2 .r space next drop next ; x">nil</p>
<p>fib 1:</p>
<p class="forth" forthcode=" : fib1 1 1 begin over . swap over + dup 10000 > until 2drop ; fib1">nil</p>
<p>fib 2:</p>
<p class="forth" forthcode=" fib2 ">nil</p>
如此一來會增加網頁程式設計師對Forth語言的興趣吧??? 哈哈....應該還有一段遙遠的路要走吧!!
寄件者 scratchlab02 |
JimmyScratchLab Forth.js(a fork of JeForth) Demo
9*9:
nil
fib 1:
nil
fib 2:
nil
沒有留言:
張貼留言