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

Re: BC XC or BX Q2



Reply to note from Eric Van Tassel <101233.342@xxxxxxxx>
 Mon, 16 Oct 2000 14:02:35 -0400

-> [a] {BX}se .word.{Q2} works, of course.

Right.

-> [b] {BX}se .{WA}.{Q2} also works, in the literal sense that it
-> finds the function-call string "{WA}"; but it won't find what
-> the wildcard call represents, i.e. any alphabetic character.

Right again.

-> However, BX-Q2 _can_ be used to (as in the above example) find
-> the next alphabetic character, thus:
-> [c] {BX}(se .{A}.){Q2}

Now, wait a minute! Example [c] is wrong and misleading. Wrong,
because BX usage is EITHER to enclose the entire command in parens
(or square brackets or curly braces), OR to forego parens entirely
and end the command with func Q2; never both. The func Q2 at the
end of example [c] is bad! It should be either:

[c1] {BX}se .{A}.{Q2}
 or
[c2] {BX}(se .{A}.)

Example [c] is misleading, because it suggests that BX's ability to
do wildcard searches depends on which variant -- BX commandQ2 or
BX (command) -- is used. Nothing of the kind! To search for any
alpha character, you've got to use the reverse-video "A" wildcard --
the character produced by *executing* func WA -- not func WA itself.
Period!

-> ... {BX}se .{A}.{Q2} doesn't [work].

Beg to differ. It works, and works flawlessly. Check your syntax,
Eric, and try again.

As to the usage variants, BX commandQ2 is preferred because in rare
but critical situations BX (command) has been known to fail with
certain legal commands, whereas BX commandQ2 succeeds with the same
commands. In the Jumbo U2, we've adopted BX...Q2 universally,
except in rare search commands where func Q2 itself is part of the
search string. Compare the two search statements in frame
{{5bx2bc}} (Change next-following "BX ...Q2 " to "BC ...XC "), which
first searches for the next occurrence of func BX:
BX se BX Q2
then searches for func Q2:
BX [se Q2 ]

Another advantage of BX commandQ2 over BX (command) has to do with
limits on command length. BX (command) has something like a 77-byte
limit, whereas BX commandQ2 is much higher, something like 255
bytes. (Don't quote me on the numbers; the point is that the
difference is substantial.) While a 77-character limit may seem
like plenty, in XPL it can be constraining. Search statements with
multiple wildcards, Speedo chars or other 3-byte entities can easily
run over a hunderd bytes.

Conclusion: BX...Q2 is THE way to execute commands in v4+ XPL. Can
this really be news? BX has been around for eight years!

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