,---------------.
| Contributions |
`---------------´
,------------------------------------------
| 2022-08-28 11:10:27 flaagel wrote:
| testcase - >NUMBER Test Patterns
| see: https://forth-standard.org/standard/core/toNUMBER#contribution-262
`------------------------------------------
I am trying to implement >NUMBER on the top of a working 79-STANDARD CONVERT implementation. What I came up with so far is:
: >NUMBER ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
>R DUP >R \ S: ud1 c-addr1 R: u1 c-addr1
1- CONVERT \ S: ud2 c-addr2 R: u1 c-addr1
DUP R> - \ S: ud2 c-addr2 c-addr2-c-addr1 R: u1
R> SWAP - ; \ S: ud2 c-addr2 u1-(c-addr2-c-addr1)
But I have a problem with one of the test cases:
T{ 0 0 GN' F' 10 >NUMBER-BASED -> F 0 GN-CONSUMED }T
My interpreter chokes on the F character right after -> because the current BASE is decimal.
I think this test pattern is incorrect. Anyone cares to shed tome light on this?
,------------------------------------------
| 2022-08-28 19:24:27 GeraldWodni wrote:
| proposal - Test Proposal
| see: https://forth-standard.org/proposals/test-proposal#contribution-263
`------------------------------------------
## This is a test proposal
Let's see if the system & programmer proposals work
,---------.
| Replies |
`---------´
,------------------------------------------
| 2022-08-20 11:33:03 ruv replies:
| proposal - Exclude zero from the data types that are identifiers
| see: https://forth-standard.org/proposals/exclude-zero-from-the-data-types-that-are-identifiers#reply-853
`------------------------------------------
> Should the notation `{0}` be also described?
Since relative complement is used only for `{0}`, this notation can be introduced at once with relative complement:
The notation `i \ {0}` is used to denote "the data type that includes all those and only those members of _i_ which are not single-cell zero value".
,------------------------------------------
| 2022-08-20 12:01:41 ruv replies:
| comment - Exception word set is not optional any more
| see: https://forth-standard.org/standard/exception#reply-854
`------------------------------------------
Actually, I agree. It just useful to see a comparison of different solution, and a clear list of proposed changes.
> a standard program would have to consider both behaviours.
If a program relies on the Exception word set (e.g. it uses `catch`), it have to consider only one behavior, since it cannot work on the systems that don't provide the Exception word set. If the program doesn't use `catch`, it doesn't consider any specific behavior in the corresponding cases at all.
-----
Having the Exception word set mandatory, don't you think that CORE `ABORT` and CORE `ABORT"` should be removed, and their EXCEPTION versions and `THROW` should be corrected/rewritten?
,------------------------------------------
| 2022-08-20 16:39:04 AntonErtl replies:
| comment - Exception word set is not optional any more
| see: https://forth-standard.org/standard/exception#reply-855
`------------------------------------------
Even if the program did not contain CATCH, it would have a different (unambiguous) meaning with the exception wordset and be ambiguous without.
> Having the Exception word set mandatory, don't you think that CORE ABORT and CORE ABORT" should be removed, and their EXCEPTION versions and THROW should be corrected/rewritten?
Yes, something like that.
,------------------------------------------
| 2022-08-20 16:47:25 AntonErtl replies:
| requestClarification - Should QUIT propagate exceptions?
| see: https://forth-standard.org/standard/core/QUIT#reply-856
`------------------------------------------
Concerning the throw code -56 that you mention on github, I don't think it has anything to do with the Forth word QUIT. My guess is that it's for the Unix signal SIGQUIT (however, none of Gforth, iforth, lxf, SwiftForth, VFX converts it into a Forth exception; instead, SIGQUIT terminates them all).
,------------------------------------------
| 2022-08-26 12:19:58 ruv replies:
| proposal - Specify that 0 THROW pops the 0
| see: https://forth-standard.org/proposals/specify-that-0-throw-pops-the-0#reply-857
`------------------------------------------
In the frame of a big re-organization of [`THROW`](https://forth-standard.org/standard/exception/THROW) specification, the following phrase should be also corrected:
> If any bits of n are non-zero, pop the topmost exception frame from the exception stack, along with everything on the return stack above that frame.
The part "_along with everything on the return stack above that frame_" should be removed, since it implies that the [exception stack](https://forth-standard.org/standard/exception#subsection.9.3.3) **is** implemented using the return stack.
The return stack depth is restored according to the part "adjust the depths of all stacks defined by this standard so that they are the same as the depths saved in the exception frame".
Also, the specification for [`CATCH`](https://forth-standard.org/standard/exception/CATCH) should require it to save in the exception frame the depth of all stacks defined by this standard .
,------------------------------------------
| 2022-08-28 19:25:03 GeraldWodni replies:
| proposal - Test Proposal
| see: https://forth-standard.org/proposals/test-proposal#reply-858
`------------------------------------------
Call for votes, does that work?