Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: Some snippets for Carbon PowerMops



Thanks Roelf.

This one is also for 5.3:

-Doug


need zstring+
string+ s1
string+ s2

: .id?  ( xt -- )
        NAME? IF >name N>COUNT ( addr len )
                        put: s2
                        get: s1 search: s2
                        IF all: s2 type cr 0 -> out THEN
                ELSE drop
                THEN ;
                
: wordsWith  bl word count ( addr len )
        new: s1  new: s2  put: s1
        setToTop: theMark
        0 -> out cr
        BEGIN
                next: theMark
                ?dup
        WHILE
                link> .id?
        REPEAT
        cr ." wordsWith done "   cr
        release: s1 release: s2 ;


endload

\ usage

wordswith print

PRINTDOCHANDLER
PRINTDOCVEC
PRINTGPRS
SPRINT
PRINTDOCVEC

wordsWith done 
 ok



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.