[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gforth] words backwards (J. David Boyd)
From: |
Bernd Paysan |
Subject: |
Re: [gforth] words backwards (J. David Boyd) |
Date: |
Fri, 19 May 2017 23:30:03 +0200 |
Am Freitag, 19. Mai 2017, 22:01:16 CEST schrieb James Gere:
> The above, rather inefficient code, works on android gforth.
Less clumsy, fully efficient by using TRAVERSE-WORDLISTs end flag:
: nwords ( n --- )
cr 0 [: .word >r 1- r> over 0> ;] context @ traverse-wordlist 2drop ;
This stuff works on all recent Gforths, not just the Anroid one.
--
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o ID: kQusJzA;address@hidden(dQ*
http://bernd-paysan.de/