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

Re: Long strings in CI ///



Good on ya', Carl.
One thing I don't understand: if BX doesn't involve the CMline, why is it limited to CMline length? Is it just an accident of the evolution from BC?
Your (earlier) BIGCI is working beautifully. I've used it under stressful conditions (excluding strings longer than about a paragraph) and it has not failed. I've had a lot of problems using it, but they all turned out to be something amiss with the search string or the way I was coding things from XyBasic. So it's been great using BIGCI.
Regards,
Harry
Reply to note from Harry Binswanger Thu, 02 Dec 2010 18:49:55 -0500
> That won't work in XyBasic.
Oy. We're speaking two different languages. Nem beselek XyBasic!
OK: revised frame BIGCI*, with new rules:
Input is now in the form of the argument normally taken by the CH|CI|CV command, i.e.: {separator}string_to_find{separator}replacement_string{separator}
In the following examples, for simplicity's sake, I'll use "/old_string/new_string/". The separator can be any character, as
long as it's not contained in either old_string or new_string.
(Moscow rules, George!)
1) XPL usage: JM 2.BigCI[A][/T]Q2
2) Command usage:
With the subject file -- the file you want to change -- in the
current window, open a blank NEw file: command NE
The subject file should now be in the alternate screen.
At the very top of the NEw file, put the argument:
/old_string/new_string/
(Remember, the reason we're using a text window is that the argument is too long to fit on the CMline!)
Now, on the CMline, with the NEw file (search argument) still in the
current window and the subject file still in the alternate screen,
issue:
BIGCI[A][/T]
BIGCI = Change Invisible
BIGCIA = Change Invisible, case Absolute search
BIGCI/T = Change Invisible, start from Top of subject file
BIGCIA/T = Change Invisible, case Absolute search, start from Top of
subject file
Operation is from cursor position to end of file (unless option T is
used). Wildcards are NOT allowed in either the search or the replace
string. "Wildcard" means ANY red reverse-video character that stands
for one or more other characters.
This brings the usage into line with other U2 frames (argument in
S/G 50).

Note: You can also use frame U2L to execute this frame, but the U2L
command window has a 660-character limit. Usage 2B above does not
have this limit (although the usual out-of-memory considerations
applicable to XPL programs are still in play).

Enjoy.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5BigCI*}} ChangeInvisible on long strings [CLD rev.12/2/10
][cr|lf]{002}[BX_]es 1[Q2_]{<}LBa{>}{<}IF{<}VA$WS{>}==1{>}{<}
IF{<}VA|50{>}<1{>}[XD_][YD_][XP_][TF_][DF_][BF_][DF_]{<}SV50{
{062}}[YD_][AS_]{<}GLa{>}{<}EI{>}[DX_]{<}IF{<}VA|50{>}>0{>}{<}SV0
1,{027}X{>}{<}SV02,{>}{<}XS50,01,,01,02{>}{<}IF{<}IS02{>}{240
}{<}IS01{>}{>}{<}SV03,{>}{<}XS02,01,50,,03{>}{<}SX51,{<}IS03{
{062}}{>}{<}IF{<}IS03{>}{240}{<}IS01{>}{>}{<}XS03,01,51,,02{>}{<}
EI{>}{<}SU01,{<}SX02,0{>}{<}IF@upr({<}IS03{>})==@upr({<}IS50{
{062}}){>}{<}SX02,1{>}{<}EI{>}{>}{<}IF@upr({<}VA$FR{>}){240}"A"{>
}{<}SU01,{<}SX02,0{>}{<}IF{<}IS03{>}=={<}IS50{>}{>}{<}SX02,1{
{062}}{<}EI{>}{>}{<}EI{>};*;[cr|lf]{<}SV04,{>}{<}IF{<}VA|50{>}>36
{>}{<}SV03,{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{0
27}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{027}X{02
7}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{>}{<}XS50,03,03,
04,03{>}{<}GLb{>}{<}EI{>}{<}SX04,{<}IS50{>}{>}{<}LBb{>}{<}IF@
upr({<}VA$FR{>}){240}"T"{>}[TF_][TF_]{<}EI{>}{<}SX05,0{>}{<}L
Bc{>}[BX_]se [999]{<}PV04{>}[999][Q2_]{<}IF@not({<}ER{>}){>}[
BX_]seb [999]{<}PV04{>}[999][Q2_]{<}SX03,{<}CP{>}+{<}VA|50{>}
{>}[YD_][DF_][BX_]jmp {<}PV03{>}[Q2_][DF_]{<}SV03{>}{<}GT01{>
}{<}IF{<}PV02{>}>0{>}[DN_]{<}GT51{>}{<}SX05,{<}PV05{>}+1{>}{<
}EI{>}{<}IF{<}VA$DE{>}>0{>}[DB_][YD_][CR_]{<}EI{>}{<}GLc{>}{<
}EI{>}{<}SX50,{<}IS05{>}{>}{<}SX01,{<}IS05{>}+" changes"{>}{<
}LBd{>}{<}PR@01{>}{<}EX{>}{<}EI{>}{<}EI{>}{<}SX50,-1{>}{<}SV0
1,Bad or missing search input{>}{<}GLd{>}{<}EI{>}{<}SX50,0{>}
{<}SV01,No file{>}{<}GLd{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

cld@xxxxxxxx
-- Carl Distefano

Harry Binswanger
hb@xxxxxxxx