From: shtps <sh...@pr...> - 2022-10-07 16:30:33
|
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 |