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

Re: Long strings in CI ///



Great! Just what I needed when I need it. I'll be putting it
to use in about 1/2 hour. I'll let you know the results.



Reply to note from Harry Binswanger Wed, 01 Dec
2010 16:42:45 -0500

Harry:

> So it's not an all-purpose tool.
>
> I could fairly easily modify it to be the all-purpose tool, but
> I'm too busy to do that just now.

I thought I'd write a lean-and-mean, almost-all-purpose, XPL-only
variant of BIGCHG. Here it is: BIGCI. Add to U2. Use it as a
subroutine in XPL programming, like this:

;*;
JM2.BigCIQ2 ;*;

No wildcards. For a case-Absolute search, use framename BigCI/A; to
search from Top_of_file, BIGCI/T (otherwise search proceeds from
cursor position to end of file); for both options, BIGCI/AT (one
forward slash ["/"] only). There is no Verify option; as I said,
lean and mean. In my tests it has CI-like speed. Try it when you
have a moment, and let me know.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5BigCI*}} ChangeInvisible on long strings (S/G 50 in=Find$
, S/G 51 in=Replace$; S/G 50 out=number of changes) [CLD rev.
12/1/10][cr|lf]{002};*;[cr|lf];*;  Usage:[cr|lf];*;  {<}SV50,
Find${>}{<}SV51,Replace${>}[JM_]2.BigCI[/[A[T]]][Q2_][cr|lf];
*;  /A=Case-Absolute search; /T=Search from Top_of_file[cr|lf
];*;[cr|lf]{<}IF{<}VA|50{>}>0{>}{<}IF{<}VA$WS{>}==1{>}{<}IF{<
}VA|51{>}<0{>}{<}SV51,{>}{<}EI{>}[BX_]es 1[Q2_][DX_]{<}SV01,{
{062}}{<}IF{<}VA$FR{>}{240}"/"{>}{<}SX01,@upr({<}VA$FR{>}){>}{<}S
X01,{<}VA@01/2{>}{>}{<}EI{>}{<}SU02,{<}SX03,0{>}{<}IF@upr({<}
IS04{>})==@upr({<}IS50{>}){>}{<}SX03,1{>}{<}EI{>}{>}{<}IF{<}I
S01{>}{240}"A"{>}{<}SU02,{<}SX03,0{>}{<}IF{<}IS04{>}=={<}IS50
{>}{>}{<}SX03,1{>}{<}EI{>}{>}{<}EI{>};*;[cr|lf]{<}SV05,{>}{<}
IF{<}VA|50{>}>36{>}{<}SV04,{027}X{027}X{027}X{027}X{027}X{027
}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}
X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X
{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{
{062}}{<}XS50,04,04,05,04{>}{<}GLa{>}{<}EI{>}{<}SX05,{<}IS50{>}{>
}{<}LBa{>}{<}IF{<}IS01{>}{240}"T"{>}[TF_][TF_]{<}EI{>}{<}SX06
,0{>}{<}LBb{>}[BX_]se [999]{<}PV05{>}[999][Q2_]{<}IF@not({<}E
R{>}){>}[BX_]seb [999]{<}PV05{>}[999][Q2_]{<}SX04,{<}CP{>}+{<
}VA|50{>}{>}[YD_][DF_][BX_]jmp {<}PV04{>}[Q2_][DF_]{<}SV04{>}
{<}GT02{>}{<}IF{<}PV03{>}>0{>}[DN_]{<}GT51{>}{<}SX06,{<}PV06{
{062}}+1{>}{<}EI{>}{<}IF{<}VA$DE{>}>0{>}[DB_][YD_][CR_]{<}EI{>}{<
}GLb{>}{<}EI{>}{<}SX50,{<}IS06{>}{>}{<}SX01,{<}IS06{>}+" chan
ges"{>}{<}LBc{>}{<}PR@01{>}{<}EX{>}{<}EI{>}{<}SX50,0{>}{<}SV0
1,No file{>}{<}GLc{>}{<}EI{>}{<}SX50,0{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

--
Carl Distefano
cld@xxxxxxxx


Harry Binswanger
hb@xxxxxxxx