From: shtps <sh...@pr...> - 2022-10-18 15:20:07
|
It looks like I had a really old version from somewhere and this was already fixed. I got Version: 6.15.05 Build: 2 and it works as expected, so the mail can be ignored. ------- Original Message ------- On Friday, October 7th, 2022 at 4:30 PM, shtps <sh...@pr...> wrote: > Hello, > > long story short, I wanted to verify if my ANS Forth compliant program works with other ANS Forth compliant Forths and found that Win32Forth implements SEARCH differently. > > I ran my test cases and they pass for both Gforth and SwiftForth, but they fail with Win32Forth. > > Upon closer investigation, the address that Win32Forth returns for the match with SEARCH is the address _after_ the delimiter, while the standard states that it should return the address where the match has been found including the search string. > > STC kernel > version: 0.02.05 build: 957 > s" hello[DELIMITER]world" s" [DELIMITER]" search drop cr typeworld ok > > Gforth 0.7.3, Copyright (C) 1995-2008 Free Software Foundation, Inc. > Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' > Type `bye' to exit > s" hello[DELIMITER]world" s" [DELIMITER]" search drop cr type [DELIMITER]world ok > > SwiftForth i386-Linux 3.11.9 03-Sep-2022 > s" hello[DELIMITER]world" s" [DELIMITER]" search drop cr type [DELIMITER]world ok > > See: https://forth-standard.org/standard/string/SEARCH > > To me this seems like a bug. > > Best Regards, > shtps |