| Deutsch English Français Italiano |
|
<de084ed29e5acc412c06ed739c24929f22313288@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: Roman numerals , recognizer "0r". Date: Mon, 9 Jun 2025 02:07:07 +1000 Organization: i2pn2 (i2pn.org) Message-ID: <de084ed29e5acc412c06ed739c24929f22313288@i2pn2.org> References: <nnd$3b511631$511bab64@a22533c0c24c276e> <2b70970932fa6f4379e708e30e8857f6@www.novabbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 8 Jun 2025 16:07:09 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="3841102"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird Content-Language: en-GB X-Spam-Checker-Version: SpamAssassin 4.0.0 In-Reply-To: <2b70970932fa6f4379e708e30e8857f6@www.novabbs.com> On 9/06/2025 12:41 am, LIT wrote: > 0 VARIABLE FORMER > 0 VARIABLE PRESENT > > HERE 73 C, 86 C, 88 C, 76 C, 67 C, 68 C, 77 C, \ I V X L C D M > HERE 0 C, 1 C, 2 C, 10 C, 20 C, 100 C, 200 C, > > : VAL ( ch -- u ) > [ 0 ] LITERAL SWAP > LITERAL LITERAL > DO > DUP I C@ = > IF DROP I 7 + C@ DUP 0= SWAP 5 * + NIP 1 SWAP LEAVE THEN > LOOP > OVER IF NIP ELSE DROP THEN > [ 0 0 ] ; 2DROP Yep. Nothing better than FigForth :) How about ... : CREATE 0 VARIABLE -2 ALLOT ;