\ WITH.MFP { Utility word used to locate words in the dictionary that include the sub-string you provide. Great if you can't remember all the words or want to find asimilar word. Usage: WORDS.WITH open would display all the words that have open such as OPEN, OPEN$, OPEN", OPEN.FILE, etc. -Scott Squires } \ Last Revision: 06/23/88 10:51:45 PM sws { Frequently I need to locate a word even when I can't remember the exact spelling or I need to find related words such as all the mouse functions. This is a quick program I wrote as a utility. It searches the dictionary for a sub-string match and displays words that contain the sub-string. You can locate all words that deal with "XY" or "TF" (text fields), etc. Parts of this were borrowed from the Sibley Editor. You'll need MacForth+ 3.53. The program uses the definitions used for WORDS. These are found in the Misc Support file in the extensions folder and they should be part of MacForth+ Extended. If you have any problems let me know. -Scott Squires } anew --list.words-- global FIND.SCRAP \ handle : >FIND.SCRAP ( addr \ cnt -- | moves string for munger usage ) locals| cnt addr | find.scrap to.heap \ release handle 0 from.heap to find.scrap \ make new handle find.scrap cnt resize.handle \ make it large enough to hold string 0< if abort" error" then \ abort if not enough memory available addr find.scrap @ cnt cmove ; \ copy string to allocated string space create BUF$ 36 allot \ temp buffer : FINDLIST ( vocHandle -- ) \ prints words that have the string in BUF :| ( entryPtr -- ) 2+ count 31 and \ get correct count-byte 2dup \ save word string info >find.scrap find.scrap 0 buf$ count 0 0 munger \ in string? 0< means \ not in string 0< not if 16 >col dup 2+ ?cr \ move to correct column, \ newline if needed type 2 spaces \ display else 2drop \ remove string info if not typed then |; WordsDump ; : (LIST.WORDS) ( string -- ) ( searches context dictionary for words that have the string ) cr buf$ over c@ 1+ cmove \ copy to buffer buf$ count upper \ convert to upper case watch set.cursor CONTEXT @ findList init.cursor ; \ list words in CONTEXT : WORDS.WITH ( -- | finds any word in dictionary that includes the string ) bl word (list.words) ; \ usage- WORDS.WITH mouse would print all words in the dictionary that \ have the word "mouse" as a sub-string.