1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-21 06:10:20 +10:00
collapseos/blk/357
Virgil Dupras f6ded7712e VE: add 't'
This is the first commit I do entirely in VE. It's a habit I'm planning
on taking as it helps a lot to find usability issues.
2020-06-11 18:12:01 -04:00

17 lines
333 B
Plaintext

: (parsed) ( a -- n f )
C@+ OVER C@ 0 ( a len firstchar startat )
SWAP '-' = IF 1+ THEN ( a len startat )
0 ROT ROT ( len ) ( startat ) DO ( a r )
OVER I + C@ ( a r c ) _pdacc ( a r f )
IF DROP 1- 0 UNLOOP EXIT THEN LOOP ( a r )
( negate if needed )
SWAP C@ '-' = IF 0 -^ THEN 1 ( r 1 ) ;