,---------------. | Contributions | `---------------ยด ,------------------------------------------ | 2024-07-28 17:17:53 ruv wrote: | requestClarification - Unspecified ambiguous condition in /STRING | see: https://forth-standard.org/standard/string/DivSTRING#contribution-352 `------------------------------------------ The specification says that `u.2` is `u.1` minus `n`. If `n` is greater than `u.1`, the result of subtraction is wrapped around, and the resulting `( c-addr.2 u.2 )` cannot not be interpreted as a character string. Is it correct? I think, either behavior (or maybe meaning) should be specified, or an ambiguous condition should be explicitly declared for this case. Thus, I see the following options: - change the result stack parameter data type to _( c-addr.2 n.2 )_ and describe what these parameters mean if _n.2_ is negative; - then, the input stack parameter data type should be changed to `( c-addr.1 +n.1 n )`, and `/string` will not be applicable to character strings longer than `max-n`; - specify that if _n_ is greater than _u.1_, it is replaced by _u.1_; - declare that an ambiguous condition exists if _n_ is greater than _u.1_; - specify that if _n_ is greater than _u.1_, an exception is thrown. It seems, the last option is preferable. What do you think?