Sujet : Re: Parsing timestamps?
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 10. Jun 2025, 11:32:58
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <7d72f30b842036aa0ecd68ad541dd88945b800f2@i2pn2.org>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 10/06/2025 7:18 pm, B. Pym wrote:
...
: SCAN-NUMBER-OR-SKIP ( n adr len -- n' adr' len')
DUP >R
0 0 2SWAP >NUMBER
DUP R> =
IF 2SWAP 2DROP 1 /STRING
ELSE
2>R D>S SWAP 60 * + 2R>
THEN ;
0 0 2SWAP >NUMBER invariably crops up so I have it in the kernel as
(NUMBER). 2SWAP 2DROP is another and becomes 2NIP. Forth would
have one define the same thing over and over. Do it once and be done
with it IMO.