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

Re: XYwrite macro please....



Reply to note from "Yo Intl. YK"  Mon, 2 Sep 2002
10:43:38 +0900

> If any of the XPL gurus has some time to spare, I would be
> really grateful if he/she could write a macro that: extracts
> all the words containing an ampersand from a text file, puts
> them in a separate file and sorts them.
> ...
> Or does such a macro already exist ?

The following procedure for Xy4+|NBWin -- issue DECODE to
decode it -- lists all words containing "&" in an Untitled file,
then sorts the list. To eliminate case-sensitive duplicates,
"uncomment" the line indicated in the code. This can be easily
generalized, by the way, to a routine that lists all words
containing any specified string.

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; Extract and sort all words containing "&" from current fi
le[cr|lf];*; For Xy4+ [CLD 9/2/02][cr|lf][XH_][BX_]es 1[Q2_]{
<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>}{<}IF{<}V
A$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}EI{>}{<}SX01,{<}VA$WA
{>}{>}[BX_]func #{<}PV01{>}[Q2_][BX_]ne[Q2_][AS_][TF_][TF_][X
D_][XD_][XD_][YD_]{<}LBa{>}[BX_]se/f &[Q2_]{<}IF@not({<}ER{>
}){>}[DW_]{<}SV01{>}[YD_]{<}IF{<}IS01{>}{240}" "{>}{<}SX01,{<
}VA@01 1{>}{>}{<}EI{>}{<}IF{<}IS01{>}{240}"&"{>}[AS_]{<}GT01{
>}[255+48+68][AS_]{<}EI{>}{<}GLa{>}{<}EI{>}[AS_][DF_][TF_][TF
_][DF_]{<}SV01,{>};*;[cr|lf];*;[cr|lf];*; Remove leading ";*;
" from next line to strip duplicates from list[cr|lf];*;{<}SX
01,{<}VA$SK{>}{>}{<}SX01,"[BX_]d sk="+{<}IS01{>}+"[Q2_]"{>}[B
X_]d sk=4,80[Q2_];*;[cr|lf];*;[cr|lf][BX_]sort[Q2_][BX_]wait[
Q2_]{<}PV01{>}[TF_][TF_][AS_][TF_][TF_][AS_]{<}PRDone{>}{<}EX
{>}[cr|lf]
-nd
XPLeNCODE

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