,---------------. | Contributions | `---------------´ ,------------------------------------------ | 2019-05-20 20:19:43 ruv wrote: | requestClarification - Receiving a zero-length string | see: https://forth-standard.org/standard/core/ACCEPT#contribution-79 `------------------------------------------ Why `n2` is specified as non-zero, positive integer? What if the first received char is a line terminator? It seems that zero should be returned in such case. ,---------. | Replies | `---------´ ,------------------------------------------ | 2019-05-20 07:37:31 AntonErtl replies: | comment - Behavior when no text found | see: https://forth-standard.org/standard/core/CHAR#reply-209 `------------------------------------------ I don't see this defined in the standard at all (not even as ambiguous condition). I guess we should fix this in the standard. I think a system should react to this condition by reporting an error. ,------------------------------------------ | 2019-05-20 14:53:40 BerndPaysan replies: | comment - Behavior when no text found | see: https://forth-standard.org/standard/core/CHAR#reply-210 `------------------------------------------ There's not even a suitable standard throw code available. Gforth's current behavior is to return whatever character is found after the end of the input buffer, which is a classical read outside boundary problem. ,------------------------------------------ | 2019-05-20 16:54:34 AntonErtl replies: | comment - Behavior when no text found | see: https://forth-standard.org/standard/core/CHAR#reply-211 `------------------------------------------ I have just fixed this in Gforth, which now produces an error. I have used -16 "Attempt to use zero-length string as a name" as throw code, but it does not quite fit.