Sujet : Re: Parsing timestamps?
De : zbigniew2011 (at) *nospam* gmail.com (LIT)
Groupes : comp.lang.forthDate : 10. Jun 2025, 11:43:32
Autres entêtes
Organisation : novaBBS
Message-ID : <42213342fe71ecfb92ebd8e04d896550@www.novabbs.com>
References : 1 2 3 4 5
User-Agent : Rocksolid Light
: 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.
So now you see: one can either use variable to
make the solution cleaner - or one can create new word(s).
Either way - some new names are added to the vocabulary.
Why the use of variable, instead of new words,
should be perceived of 'inferior'? Variable is a word too.
This reminds me somewhat that talk about 'using Lynx
browser in every condition no-matter-what'. Even, if
it makes me 'fighting the WWW' instead of just getting
required job done and switching to more pleasant things.
--