| Deutsch English Français Italiano |
|
<b3eb95a9ff96ee337314e751fbd450c56439d060@i2pn2.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: dxf <dxforth@gmail.com> Newsgroups: comp.lang.forth Subject: Re: Parsing timestamps? Date: Mon, 7 Oct 2024 13:10:56 +1100 Organization: i2pn2 (i2pn.org) Message-ID: <b3eb95a9ff96ee337314e751fbd450c56439d060@i2pn2.org> References: <1f433fabcb4d053d16cbc098dedc6c370608ac01@i2pn2.org> <a3365e0c6c574a54f4caa31c3f5ba4f2@www.novabbs.com> <24f3b255de9d943acf76851692ec1724@www.novabbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 7 Oct 2024 02:10:54 -0000 (UTC) Injection-Info: i2pn2.org; logging-data="896676"; mail-complaints-to="usenet@i2pn2.org"; posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc"; User-Agent: Mozilla Thunderbird X-Spam-Checker-Version: SpamAssassin 4.0.0 Content-Language: en-GB In-Reply-To: <24f3b255de9d943acf76851692ec1724@www.novabbs.com> Bytes: 1694 Lines: 28 On 7/10/2024 12:33 am, FFmike wrote: > On Sun, 6 Oct 2024 13:08:56 +0000, FFmike wrote: > >> FlashForth allows only "." as number punctuation. > > This was nonsense, NUMBER? never sees the punctuation anyway. > But I added error handling in case someone puts a double number > punctuation in the string. > > : /t ( addr len -- ) > 'source 2@ >r >r >in @ >r > 'source 2! 0 >in ! > 3 for > [char] : word number? > dup 1 = if > drop > else > 2 = if drop else drop 0 then > then > next > r> >in ! r> r> 'source 2! > ; The problem is handling the partial forms. s" 6:0:0" /t s" 6:0" /t s" 6" /t