Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: sean@conman.org Newsgroups: comp.lang.forth Subject: Re: THROW codes and ambiguous conditions Date: Wed, 4 Jun 2025 19:25:08 -0000 (UTC) Organization: Conman Laboratories Lines: 29 Sender: Sean Conner Message-ID: <101q6ik$10htc$1@dont-email.me> References: <2025Jun3.081034@mips.complang.tuwien.ac.at> Reply-To: sean@conman.org Injection-Date: Wed, 04 Jun 2025 21:25:09 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6ce5b89791823d6969c170c3dcb4ad5e"; logging-data="1066924"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rjd4jVPvL9tkdUZlt4KFS" User-Agent: tin/2.4.0-20160823 ("Octomore") (UNIX) (Linux/2.6.9-100.EL.plus.c4smp (i686)) Cancel-Lock: sha1:ZvmQYbmVOywfJD8PZ0qU2IA8LCI= It was thus said that the Great dxf once stated: > > Perhaps the TC went along with Mitch. CATCH THROW was his idea and > here's a bunch of codes to go with it. The extent to which a tiny forth > is going to use ANS is dubious. What constitutes a "tiny Forth"? Because I just implemented ANS Forth [1] for the 6809 [2], and I included CATCH and THROW. It's almost 12K in size and for the wordsets it implements, it passes the ANS Forth test suite. I implemented the EXCEPTION wordset because it seems a 2017 update mandated it's use. While I'm not a fan of exceptions, it wasn't hard to implement and it seemed better thought out than SYNONYM [4]. -spc [1] I implemented CORE, CORE-EXT, DOUBLE, DOUBLE-EXT, EXCEPTION, EXCEPTION-EXT, LOCAL, LOCAL-EXT, TOOLS, some of TOOLS-EXT [3], SEARCH, SEARCH-EXT, STRING and STRING-EXT. [2] https://github.com/spc476/ANS-Forth [3] Words implemented from TOOLS-EXT: AHEAD, BYE, CS-PICK, CS_ROLL, N>R, NAME>COMPILE, NAME>INTERPRET, NAME>STRING, NR>, STATE, TRAVERSE-WORDLIST, [DEFINED], [ELSE], [IF], [THEN], [UNDEFINED]. [4] When reading about it [5], I decided I didn't want anything to do with that quagmire of a word. [5] https://forth-standard.org/standard/tools/SYNONYM