I couldn't find the reason for the error but what I found follows:

> 15 buffer: test
 ok
> test 10 accept
123456789012
 ok
> test 15 type
1234567892 ok

Should have been 1234567890
The 2, being the last character typed, has replaced the 0 at position 10,
or the last character to be accepted

> : a 15 0 do test I type cr loop ;
 ok
> a

1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567892
1234567892
1234567892
1234567892
1234567892
 ok

So Accept only stored the 10 characters, but the last character typed goes
into the last position of the buffer

Same behaviour with 12 characters being accepted
> test 12 accept
1234567890123456
 ok
> a

1
12
123
1234
12345
123456
1234567
12345678
123456789
1234567890
12345678901
123456789016
123456789016
123456789016
 ok
>

Kind regards
Richard
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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