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

Re: Ignorant XY4 question



Reply to note from leslie bialler  Sun, 04 Jul
1999 09:43:19 -0400

-> CI /19{WN}{WN}/20{WN}{WN}/
-> CI /19{WN}{WN}/{WN}{WN}20/
-> CI /19{WN}{WN}/20{WN}{WN}/

Actually, all three of these commands work fine in Xy4 and XyWin.

Here's my note of 1 Sep 1998:

---------------
Reply to note from Harry Binswanger  Tue, 1 Sep
1998 21:19:40 -0400 (EDT)

-> If the actual error message is something about the wildcards in
-> the search and replace side not matching, I get that it would
-> love to know how to fix it. (Obviously, I'm talking about when
-> the wildcards *do* match, but Xy thinks they don't.)

The error message (No. 567) says:	"Wildcards must be in the same
order on both sides of a change." As Harry indicates, there are
many instances where the wildcards are clearly "in the same order"
but the change command fails anyway. For example,
cv / [wL][wX]/ [wL][wX]/ works, but cv / [wW][wX]/ [wW][wX]/
produces the error. (I use, e.g., "[wL]" as a stand-in for the
reverse video L "any letter" wildcard.) In fact, the wording of
error msg. 567 is misleading. It's really a catch-all for any
wildcard formulation that Xy is unable to interpret. The "order" of
the wildcards often has nothing to do with it.

But are all of these things really errors? Using an OR wildcard on
the right side will trigger the message, and understandably so. An
"A or B" formulation on the right side is fatally ambiguous; how is
Xy supposed to choose which of A or B to change the left side to?
OTOH, why doesn't cv / [wW][wX]/ [wW][wX]/ work? The problem isn't
with the wildcards on the left; for example, Xy has no trouble
interpreting cv / [wW][wX]/ a/. If it can interpret / [wW][wX]/ on
the left, why doesn't cv / [wW][wX]/ [wW][wX]/ just substitute the
matching string for itself? Should work, but it doesn't. In
general, it seems that Xy can't process a right-side statement using
any wildcard combination that represents a string of variable length
(e.g., [w3][wX] or [wW]) or of indeterminate content (the "A or B"
example).

Since error 567 covers a multitude of cases (including many which
aren't obviously errors), it's not surprising that there's no single
"fix". The bottom-line best approach is to look for a variant of
the change command that doesn't cause the error. More often than
not, in my experience, one can be found. For instance, instead of
cv / [wW][wX]/ [wW][wX]/, use cv / [wX]/ [wX]/. (It's a trivial
example, I know, but you get the idea.)

You might have to use 2 or 3 change commands where one might have
sufficed. It's still better than trying to "fix" limitations so
deep-seated that even XPL would bump up against them.

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

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