Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.forth > #133563

Re: THROW codes and ambiguous conditions

Date 2025-06-01 19:44 +0200
Subject Re: THROW codes and ambiguous conditions
Newsgroups comp.lang.forth
References <f827ba6fc80427f3ce0317835bd8ae47a4445e07@i2pn2.org>
From Hans Bezemer <the.beez.speaks@gmail.com>
Message-ID <nnd$5d07338c$61b87fbd@d4d89ef8da41e19e> (permalink)
Organization KPN B.V.

Show all headers | View raw


On 31-05-2025 03:10, dxf wrote:
> AFAICS the statement in Section 9.3.5
> 
>   "A system choosing to execute THROW when detecting one of the ambiguous
>    conditions listed in table 9.2 shall use the throw code listed there."
> 
> effectively rules out the traditional use of ABORT" to convey the ambiguous
> conditions listed in the table.  Is that how others read it?
> 
> Early on DX-Forth it became apparent that maintaining a list of error
> messages accessible by means of a THROW code was going to be messy and
> worse - costly.  I wanted CATCH THROW but could do without the vision
> ANS appeared to have in mind for it.  The consequence of retaining
> ABORT" for classic ambiguous conditions means I can't individually
> identify them at CATCH but I've yet to find this a problem.
> 
> I'm curious whether others found ANS' requirement above 'a step too far'?
> 

Frankly - I find the standard severely lacking in this regard. They do 
provide a long table with "errors", but fail to properly define them. 
All we get is a description, open to interpretation. IMHO - this is not 
how to set up a standard.

If the condition is described in more detail elsewhere, a basic 
reference should be listed. Even better - a mnemonic should be attached, 
not a "hard" code. I mean, even in their freshman years CS students are 
taught to use enums and constants instead of literals.

But okay - as usual, we do what we can. But I'm *not* gonna include a 
huge list of non-contiguous messages. Forget it. I got thirty - and 
that's frankly enough.

3, 4, 5, 6, 9, 10, 12, 13, 19, 22 and 24 are "standard" as far as I'm 
concerned - and the rest is either missing ("dictionary overflow"? 4tH 
has no dictionary!) or located elsewhere.

4tH *DOES* provide a list of mnemonics - and I advise to use those in 
programs rather than ANS THROW codes - if you want to write portable 
code, that is.

Note that in 4tH there is a compiler on one hand and on the other hand 
an interpreter - and never the twin shall meet. This also means that 
most of the codes/messages are specific to the one or the other.

In short, 4tH handles this issue conform its ANS-Forth statement:

"1. 4tH uses a different architecture which makes it impossible to be 
ANS-Forth compliant, so some constructions are simply not feasible;
2. Some constructions in ANS-Forth are considered to be illogical, 
inelegant, bloated, not intuitive, error prone, inefficient or otherwise 
not acceptable."

Hans Bezemer

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-05-31 11:10 +1000
  Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-05-31 06:02 +0000
    Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-05-31 20:53 +1000
      Re: THROW codes and ambiguous conditions sjack@dontemail.me (sjack) - 2025-06-03 20:48 +0000
    Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-05-31 13:53 +0200
      Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-05-31 16:07 +0000
        Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-01 12:47 +0200
          Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-06-01 15:15 +0000
            Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-01 19:35 +0200
  Re: THROW codes and ambiguous conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2025-06-01 19:44 +0200
    Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-02 14:58 +1000
    Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-02 12:44 +0200
      Re: THROW codes and ambiguous conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2025-06-02 21:20 +0200
        Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-03 13:23 +1000
          Re: THROW codes and ambiguous conditions mhx@iae.nl (mhx) - 2025-06-03 06:04 +0000
            Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-04 12:03 +1000
              Re: THROW codes and ambiguous conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2025-06-06 12:47 +0200
          Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-06-03 06:10 +0000
            Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-05 00:44 +1000
              Re: THROW codes and ambiguous conditions sean@conman.org - 2025-06-04 19:25 +0000
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-05 16:09 +1000
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-05 12:17 +0200
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-06 10:47 +1000
                Re: THROW codes and ambiguous conditions sean@conman.org - 2025-06-06 06:15 +0000
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-06 13:00 +0200
                Re: THROW codes and ambiguous conditions sean@conman.org - 2025-06-06 21:06 +0000
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-07 13:10 +1000
                Re: THROW codes and ambiguous conditions sean@conman.org - 2025-06-07 04:26 +0000
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-07 14:42 +1000
                Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-06-07 09:43 +0000
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-08 00:06 +1000
                Re: THROW codes and ambiguous conditions Paul Rubin <no.email@nospam.invalid> - 2025-06-07 12:58 -0700
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-08 01:31 +0200
                Re: THROW codes and ambiguous conditions Paul Rubin <no.email@nospam.invalid> - 2025-06-07 18:49 -0700
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-08 13:36 +1000
                Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-06-08 08:07 +0000
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-08 13:34 +0200
                Re: THROW codes and ambiguous conditions Paul Rubin <no.email@nospam.invalid> - 2025-06-10 14:11 -0700
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-08 12:16 +1000
                Re: THROW codes and ambiguous conditions anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2025-06-08 07:56 +0000
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-08 13:51 +0200
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-09 00:45 +1000
                Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-09 12:49 +0200
                Re: THROW codes and ambiguous conditions dxf <dxforth@gmail.com> - 2025-06-09 21:36 +1000
                Re: THROW codes and ambiguous conditions zbigniew2011@gmail.com (LIT) - 2025-06-09 12:24 +0000
                Re: THROW codes and ambiguous conditions zbigniew2011@gmail.com (LIT) - 2025-06-07 14:41 +0000
              Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-05 12:12 +0200
          Re: THROW codes and ambiguous conditions John <john@somewhere> - 2025-06-03 03:43 -0500
        Re: THROW codes and ambiguous conditions albert@spenarnc.xs4all.nl - 2025-06-03 12:30 +0200
          Re: THROW codes and ambiguous conditions Hans Bezemer <the.beez.speaks@gmail.com> - 2025-06-03 15:10 +0200

csiph-web