2 part forth ..
[2ch|▼Menu]
281:デフォルトの名無しさん
06/05/02 18:58:48
>>274

こんな感じか? たぶんもっと美しいやり方があるのだろうが、ヘタレの
俺にはこの程度しかわからん。

variable x
0 x !
: make.stack 1+ 1 do i loop ;
: clean.stack x @ 0 do drop loop ;
: fn recursive
dup 2 = if
drop .s swap .s swap
else
>r r@ 0 do J 1 - fn J 1 - roll cr loop r> drop
then ;
: show.all
dup x !
dup 0 = if
." Error" drop
else
dup 1 = if
.s
else
cr make.stack dup fn drop
then
x @ clean.stack
then ;

3 show.allとかやってみて。


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5330日前に更新/129 KB
担当:undef