,---------------. | Contributions | `---------------´ ,------------------------------------------ | 2019-05-11 12:15:10 mcondron wrote: | requestClarification - Behavior at end of line and end of data | see: https://forth-standard.org/standard/core/ACCEPT#contribution-77 `------------------------------------------ Three questions: 1. Should ACCEPT echo the line terminator if it is a CR or LF, or just leave the cursor where it was before the terminator? 2. Should the terminator be placed into the receive buffer, or just the text received up to the terminator? 3. What is the behavior of ACCEPT when the maximum number is reached with no terminator? I realize that probably these are all implementation-specific, but are there any conventional norms, especially about #2 and #3? Thanks! ,---------. | Replies | `---------´ ,------------------------------------------ | 2019-04-13 07:49:18 MarcelHendrix replies: | proposal - F>R and FR> to support dynamically-scoped floating point variables | see: https://forth-standard.org/proposals/f-r-and-fr-to-support-dynamically-scoped-floating-point-variables#reply-202 `------------------------------------------ Why didn't you use an FLOCAL ? ,------------------------------------------ | 2019-04-14 06:12:35 MarcelHendrix replies: | proposal - F>R and FR> to support dynamically-scoped floating point variables | see: https://forth-standard.org/proposals/f-r-and-fr-to-support-dynamically-scoped-floating-point-variables#reply-203 `------------------------------------------ Why not use FLOCALs ? ,------------------------------------------ | 2019-04-14 06:33:14 BerndPaysan replies: | proposal - F>R and FR> to support dynamically-scoped floating point variables | see: https://forth-standard.org/proposals/f-r-and-fr-to-support-dynamically-scoped-floating-point-variables#reply-204 `------------------------------------------ Probably, because there is no FLOCAL in the standard, either. ,------------------------------------------ | 2019-05-12 06:37:04 AntonErtl replies: | requestClarification - Behavior at end of line and end of data | see: https://forth-standard.org/standard/core/ACCEPT#reply-205 `------------------------------------------ 1) The standard document is clear here: What happens to the display upon receiving the line terminator is implementation-defined, but the recommendation (in the rationale) is to leave the cursor at the end of the entered text without echoing the line terminator. Note that if your ACCEPT supports editing with cursor-left and such, you should move the cursor to the end rather than leaving it where it is. 2) That's also clear in the document: When a line terminator is received, nothing is appended to the string. I.e., the terminator should not be placed into the string. 3) The document specifies termination only on receiving the line terminator, and does not specify any particular behaviour when reaching n1 characters. Gforth places the cursor behind the n1th character, but when you enter a character then, it just beeps.