[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

LISTWDS [was Re: XYwrite macro please....]



I've added some useful (and fun) features to this routine. Now it
can list all words having a specified prefix or suffix, as well as
all words that contain a specified string. Also, it recognizes
hyphenated words, i.e., treats hyphenated constructions (whether
run-of-the-mill or cream-of-the-crop) as single words.

Note that the power of LISTWDS can be leveraged with wildcards. For
example, just for fun, I listed all words in Roget's thesaurus
ending in "us", but excluding those ending in "ous", with the
following single command:

LISTWDS *[-]ous

where "[-]" represents the not-the-following-letter negation
wildcard (the reverse-video hyphen, produced by NN,- in the .KBD
file). The logophile includes 413 such words, from "abacus" to
"zoophorus". Surprisingly, as LISTWDS *phile reveals, he
doesn't mention "logophile"; the only matches being "bibliophile",
"halophile" and "microaerophile". LISTWDS *phob[W] (where
"[W]" is the reverse-video W wildcard) shows that the only words
ending in a form of "phob" are:

basophobia
batophobia
demonophobia
ergophobia
gynephobia
hydrophobia
negrophobia
theophobist
xenophobia

That's a mighty selective list (but don't you just love "ergophobia"
-- fear of work!). I suppose he was more a lover of taxonomy than
of words per se.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5listwds*}} List words in the current file that contain a{32}
specified string [CLD rev. 9/9/02][cr|lf]{2}{<}GLa{>}[cr|lf][
cr|lf]Usage (with subject file in current window):[cr|lf] Li
st words containing instring:   LISTWDS [instring][cr|lf] List words _starting_ with instring: LISTWDS [instr
ing]*[cr|lf] List words _ending_ with instring:  L
ISTWDS *[instring][cr|lf] List hyphenated words: {32}
      LISTWDS -[cr|lf] List ALL words in curr
ent file:   LISTWDS[cr|lf] Allow duplicates in l
ist:      LISTWDS/NV [instring][cr|lf] Usage{32}
reminder:           LISTWDS ?[cr|lf][cr|l
f]Note: To include footnotes, formatting commands and other e
mbedded material in the word list, the subject file must be d
isplayed in eXPanded view (command: FUNC XP) before running L
ISTWDS.[cr|lf][cr|lf]{<}LBa{>}[XH_][BX_]es 1[Q2_]{<}IF{<}VA@5
0{>}=="?"{>}{<}PRLISTWDS[/NV] [.]instring[.]{>}{<}EX
{>}{<}EI{>}{<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}{<}EI
{>}{<}IF{<}VA$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}{<}I
F{<}VA|50{>}<1{>}{<}SV50,[wA]{>}{<}EI{>}{<}SX01,{<}is50{>}{>}
{<}IF{<}IS50{>}{240}"*"{>}{<}SV02,*{>}{<}XS50,02,02,,03{>}{<}
IF"*"{238}{<}IS50{>}=={<}VA|50{>}-1{>}{<}SX50,"[wS]"+{<}is02{
>}{>}{<}SX01,{<}is02{>}{>}{<}GLb{>}{<}EI{>}{<}SX50,{<}is03{>}
+"[wS]"{>}{<}SX01,{<}is03{>}{>}{<}LBb{>}{<}EI{>}{<}IF{<}IS50{
>}=="-"{>}{<}SV50,[wL]-{>}{<}SV01,-{>}{<}EI{>}{<}SX02,{<}VA$W
A{>}{>}[BX_]func #{<}PV02{>}[Q2_][BX_]ne/1[Q2_][AS_]{<}IF{<}V
A$DT{>}>0&{<}VA$DT{>}<>8{>}[WG_]{<}IF{<}VA$DT{>}>1{>}[MK_]{<}
EI{>}{<}EI{>}[TF_][TF_][XD_][XD_][XD_][YD_]{<}SV02,{3}{8}{tab
} "()+,/:;<=>[\]^`{|}~{158}{<}{>}{176}{177}{178}{179}{180}{1
85}{186}{187}{188}{191}{192}{193}{194}{195}{196}{197}{200}{20
1}{202}{203}{204}{205}{206}{217}{218}
{219}{220}{221}{223}{238}{239}{240}{241}{242}{244}{245}{246}{
247}{248}{249}{250}{>}[DX_]{<}SX03,"Listing all words in "+{<
}VA$FP{>}{>}{<}IF{<}IS50{>}<>"[wA]"{>}{<}SV04,contain{>}{<}IF
"[wS]"{238}{<}IS50{>}==0{>}{<}SV04,start with{>}{<}EI{>}{<}IF
({<}IS50{>}+"[255+192+142]"){240}"[wS][255+192+142]"{>}{<}SV0
4,end in{>}{<}EI{>}{<}SX03,{<}IS03{>}+" that "+{<}IS04{>}+" "
""+{<}IS01{>}+""""{>}{<}EI{>}{<}PR@03{>}{<}LBc{>}[BX_]se [999
]{<}PV50{>}[999][Q2_]{<}IF@not({<}ER{>}){>}[CL_]{<}LBd{>}[DW_
]{<}SV03{>}{<}IF({<}IS03{>}+"[255+192+142]"){240}"-[255+192+1
42]"{>}{<}GLd{>}{<}EI{>}[YD_]{<}LBe{>}{<}SX04,{<}IS03{>}+"[25
5+192+142]"{>}{<}SV05,{27}X[255+192+142]{>}{<}XS04,05,05,06,0
7{>}{<}SV07,{27}X{>}{<}XS06,07,,07,08{>}{<}IF{<}IS02{>}{240}{
<}IS07{>}{>}{<}SX03,{<}IS05{>}{>}{<}GLe{>}{<}EI{>}[AS_]{<}GT0
3{>}[255+48+68][DO_][DX_][AS_]{<}GLc{>}{<}EI{>}[AS_][DF_][TF_
][TF_][DF_]{<}SV02,{>}{<}SV03,{>}{<}IF"/"{238}{<}VA$FR{>}<0{>
}{<}SX02,{<}VA$SK{>}{>}{<}SX02,"[BX_]d sk="+{<}IS02{>}+"[Q2_]
"{>}[BX_]d sk=4,80[Q2_]{<}SV03, unique{>}{<}EI{>}[BX_]sort/nv
[Q2_][BX_]wait[Q2_]{<}PV02{>}[TF_][TF_][AS_][TF_][TF_][AS_][B
X_]ch [wC] [wC][Q2_][BX_]wait[Q2_]{<}SX02,{<}VA$WC{>}{>}{<}S
V04,{>}{<}IF{<}PV02{>}<>1{>}{<}SV04,s{>}{<}EI{>}{<}SX02,{<}IS
02{>}+{<}IS03{>}+" word"+{<}IS04{>}{>}{<}IF{<}IS50{>}<>"[wA]"
{>}{<}SV04,containing{>}{<}IF"[wS]"{238}{<}IS50{>}==0{>}{<}SV
04,starting with{>}{<}EI{>}{<}IF({<}IS50{>}+"[255+192+142]"){
240}"[wS][255+192+142]"{>}{<}SV04,ending in{>}{<}EI{>}{<}SX01
,{<}IS02{>}+" "+{<}IS04{>}+" """+{<}IS01{>}+""""{>}{<}EI{>}{<
}PR@01{>}{2}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx
http://users.datarealm.com/xywwweb/