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

Re: SEarch across files (long & boring for non-programmers)



** Reply to note from "..."  Fri, 7 Mar 97 00:24:21 +0000

Annie says:
-> Hi, Carl. I use that trick too (in fact, it's in the v3 !XSE
-> crossfile search I kept announcing the other day). But: Have
-> you considered appending a func symbol to the string instead
-> of an ascii char? I use func CO or NO for the purpose. Safer
-> and works fine (i.e., no tsouris about the number of bytes per
-> char, etc.) in v3.57:
->
->  {sv12,+X CO }{sv86,CO }{sx13,{is00}+{is86}} 	
->  {xs13,12,14,12,16}{xs12,86,13,86,14}
->
-> In this case, the final char in {is00} is {is13}. 	--a

Annie, I don't quite understand. I'm using a 3-byter, not an Ascii
character. And not just any 3-byter, but one that, by definition,
could never usefully appear in a SEarch string! That's a mitzvah, no?
A legal func would emphatically *not* be safer for this purpose, 'cause
the SEarch string might very well contain a func (vide the recent
discussions here about getting 3-byte funcs on the CMline)!. If I were
doing this in III+, I'd manufacture a weird 3-byter that no one would
ever need to search for, or use a different workaround altogether.
Keep in mind there's nothing sacrosanct about 3 bytes starting with
Ascii-255 for this purpose. Five or 11 or 38 randomly-assembled bytes
would do -- the more the merrier. Come to think of it, to be 100%
failsafe, the dummy string should be longer than the CMline and/or the
longest legal SEarch string, making containment within the SEarch
string physically, if not metaphysically, impossible! But that would
be code for angels or pinheads, overkill for everyone else.


--------------
Carl Distefano  * * *