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

Re: Search/Replace Func Characters?



Reply to note from Brian.Henderson@xxxxxxxx Fri, 14 Feb 2003
09:06:44 -0800

Brian:

> I don't recall seeing this discussed before (probably because
> it's such a ridiculous question), but can the function
> characters (BX, XC, XD, etc) be searched/replaced in any way?

What's ridiculous about it? It's a perfectly sensible question.

The answer is yes. In a couple of ways. One, as Tim points out,
you can use the /FN switch and Ascii-11 (not 12) prefix. For
example:

cv/fn "[11]bc"Func BC [Blank the command line]"

A more elegant alternative is to drop the /FN switch and put the
actual 3-byte function on the CMline as part of the command. Either
of U2 routines PFUN or PFUNC enables this. You type the two-char
mnemonic, it produces the 3-byte func; if the cursor is on the
CMline, it will put the func on the CMline. You need to assign the
routine to a key: nn=NOXHJM(,2,.,p,f,u,n,c,)

Using this method, the command above would look like this (issue
DECODE to decode it):

XPLeNCODE v2.0
b-gin [UNTITLED]
cv "[BC_]"Func BC [Blank the command line]"[cr|lf][cr|lf]
-nd
XPLeNCODE

To do search and replace on functions in XPL, you can put the
functions in a BX...Q2 statement. For example, the above command
would be:

XPLeNCODE v2.0
b-gin [UNTITLED]
[BX_]cv "[BC_]"Func BC [Blank the command line]"[Q2_];*;[cr|l
f][cr|lf]
-nd
XPLeNCODE

Search and replace on functions is discussed, with examples, in
BX.TXT. It can be downloaded at the XyWWWeb site.

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