i dont understand why there must be a stack underflow ( because ?do takes two 
items thats provided through the parameters 2 2 ) but your version works but 
i dont know why.. ;)

------------------------------ snip snap
this i writed before i tested your solution..........

i pasted my output so it is a little bit clearer......

there is no stack underlow.....

[EMAIL PROTECTED] buch $ gforth
Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
: test ( x y -- ) 0 ?do 0 ?do cr i . ." ," j . loop loop ;  ok
2 2 test
. ( it starts with 1,1)
. ( and after 12000+ iterations it looks like this ...)
12728 ,1
12729 ,1
12730 ,1
12731 ,1
12732 ,1
12733 ,1
12734 ,1
12735 ,1
12736 ,1
12737 ,1
12738 ,1
12739 ,1
12740 ,1
12741 ,1
12742 ,1
12743 ,1
12744 ,1
12745 ,1
12746 ,1
12747 ,1
12748 ,1
12749 ,1
12750 ,1
*the terminal*:2: User interrupt
2 2 test
    ^^^^
Backtrace:
$B7BD216C write-file
$B7BD2898 type
$B7BD2980 d.r
$B7BD29E0 d.
$B7BFCBDC .
$335C
$2F202123
$1
$2


> My guess is that, on your system, the stack underflow was not caught,
> and on the second iteration of the outer loop, the inner loop got a
> limit that would lead to lots of inner-looping.
>
> So what you need to do is to supply a limit to the inner loop, e.g.:
> : test ( x y -- ) 0 ?do dup 0 ?do cr i . ." ," j . loop loop drop ;
>
> - anton
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to