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

Re: Programming request: delete to next X



Reply to note from Wolfgang Bechstein  Sun,
21 Jul 2002 21:07:42 +1000

Wolfgang:

> I think the following program would be useful ... Program
> waits for any keypress ... When keypress is detected, program
> deletes all text between current cursor position and next
> occurrence of pressed key ... Program terminates.

I forget whether you load the Jumbo U2, but if you do, there's a U2
routine called DEFTO$ that approximates what you want to do. The
following Xy4+ code fits your description more exactly
(DECODE to decode it):

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}IF{<}VA$WS{>}==1{>}[GT_]{<}PR|Delete from cursor to...? (P
ress a key|Esc quits){>}{<}SX01,{<}RK{>}{>}{<}IF{<}VA|01{>}<3
{>}[YD_][DF_][BX_]sea/f [999]{<}PV01{>}[999][Q2_][DF_][RD_]{<
}PRDeleted{>}{<}EX{>}{<}EI{>}{<}PV01{>}{<}EX{>}{<}EI{>}{<}PRN
o file{>}{<}EX{>}[cr|lf]
-nd
XPLeNCODE

If you don't run U2 let me know and I'll ship the code to you
privately. (If you run 3, I'm sure one of those mavens would be
glad to help.)

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