Deutsch   English   Français   Italiano  
<87zfed2sbn.fsf@nightsong.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Paul Rubin <no.email@nospam.invalid>
Newsgroups: comp.lang.forth
Subject: Re: May the numbers speak - supplement
Date: Thu, 12 Jun 2025 02:59:56 -0700
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <87zfed2sbn.fsf@nightsong.com>
References: <20129e22c76a2b18b0a745e9499cbd9b@www.novabbs.com>
	<nnd$673c55b0$2ad8f129@7aad895b352201b7>
	<cc0a8c7a3216f3ed508bde73fc8bd422@www.novabbs.com>
	<feed5481a2c6f29340546fbefb23bb31@www.novabbs.com>
	<37a6f52a3ab1ec533fcf7ef30beb1022@www.novabbs.com>
	<nnd$673c55b0$2ad8f129@52950e570341256b>
	<7c15e1538a1604ad3c7a293ae6196da2530cd1a4@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 12 Jun 2025 11:59:57 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b22d3c168fd7890798bc8b1c7e1f0c3d";
	logging-data="2745448"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18T7qiILBmJWy0jyzdPrcrG"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:fosQjgW0wslv9Cep3XYJzDiu0cg=
	sha1:FJcata1VKzhkZlW80w1bNVb5c9c=

This version with the string in memory, no error checking, and using a
variable, seems simplest to me.

variable p
: advance ( -- ) 1 p +! ;
: digit ( -- n ) p @ c@ '0' - advance ;
: 2digit ( -- n ) digit 10 * digit + ;
: hms ( a u -- h m s ) drop p !
    2digit advance 2digit advance 2digit advance ;
: test clearstack  s" 12:34:56" hms ;

test .s