All pastes #329002 Raw Edit

Untitled

public text v1 · immutable
#329002 ·published 2007-01-26 08:50 UTC
rendered paste body

: str<> str= 0= ;
: get-line 0 parse save-mem ;
: free-string drop free throw ;

: type-until: ( "delimiter" "...<\n"delimiter">" -- )
    parse-word save-mem
    begin get-line 2over 2over str<> while
	    2dup type free-string
	    refill if cr then repeat
    free-string free-string ;


type-until: EOF
The first line,
and "the second"
-- a third line, and here's EOF:
EOF

cr .( Done! )