Hi Matthias,

Matthias Trute writes:

> Hi
>
>
>> interestingly, this behaviour repeats when running the same test
>> again.
>> Looking at the code makes "depth" or the handling of depth a
>> candidate
>> for misbehaving, however, I did not look too deep.
>> 
>> Can anyone confirm?
>
> freshly flashed and loaded
>
> (ATmega16)> -1 VERBOSE !
>  ok
> (ATmega16)> t{ -1 -> -1 }t
>  ok
> (ATmega16)> 1 2 3
>  ok
> (ATmega16)> t{ -1 -> -1 }t
> WRONG NUMBER OF RESULTS: t{ -1 -> -1 }t
>  ok
> (ATmega16)> 
>
> The problem is triggered with the additional numbers on the
> data stack (1 2 3). That confuses the tester. Since the
> tester code is not mine, it may take some time to debug it.
>
I found that revision 2030 fixes the behaviour above except for
a very minor "case-sensitive" glitch. Patch below.
Thanks for this fast resolution :-)

Cheers,
Erich

svn diff common/lib/forth2012/tester/tester-amforth.frt
Index: common/lib/forth2012/tester/tester-amforth.frt
===================================================================
--- common/lib/forth2012/tester/tester-amforth.frt      (revision 2030)
+++ common/lib/forth2012/tester/tester-amforth.frt      (working copy)
@@ -41,7 +41,7 @@
 : -> \ ( ... -- ) RECORD DEPTH AND CONTENT OF STACK.
    depth dup ACTUAL-DEPTH !            \ RECORD DEPTH
    START-DEPTH @ > if          \ IF THERE IS SOMETHING ON STACK
-       DEPTH START-DEPTH @ - 0 do ACTUAL-RESULTS i cells + ! loop \ SAVE THEM
+       depth START-DEPTH @ - 0 do ACTUAL-RESULTS i cells + ! loop \ SAVE THEM
    then
 ;
 


------------------------------------------------------------------------------
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to