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

Re: Elegance in XPL sought




return, for example), and see whether it is inserted at column (cursor
position) 2 or not. Report back!
No, doesn't go to position 2. Hmmm. I rarely have formatting at the top of
file.
To my knowledge, only two functions work: CL CursorLeft and PC
PreviousCharacter.
I've never heard of PC. I see it's listed in manual and on TABLE
FUNCTIONS. How does it differ from LL and CL?
 LB LineBegin, LL LinearLeft (surprisingly), TF TopForm do
NOT work. So yes, the following would work (smallest possible code for this
operation):

XPLeNCODE v2.0
b-gin [UNTITLED]
[BX_]jmp 2[Q2_]{<}IF{<}VA$CY{>}<1{>}[CL_][CL_][cr|lf]{<}EI{>}
{<}EX{>}
-nd
XPLeNCODE

Okay.
BX se BinswangerQ2
CR             func CR CursorRight
{less than}1>... IF *column* position less than 1, you have 
Oh, good idea: play off the carriage-return rather than the line-feed, in
effect. But wait, using your points about hidden codes, I tested this in WG
mode and CR went past the hidden codes. Isn't the moral to work in XP
(except when you need another mode)?
However, that test -- and your test too -- has one fatal flaw: the string
"Binswanger" might appear at the end of a wrapped line *within* a paragraph --
in other words, the test evaluates true but no  is actually present.

You're right!
The simplest valid test would be to CR once, and evaluate whether you moved two
bytes:

BX se BinswangerQ2
+2>
CR
{equals}>... IF evaluates true, you have 

So CR/LF is the only two-byter?

What about this:
BX se Binswanger{cr|lf]
> ...

I guess we could go on about options for some time.



Harry Binswanger
hb@xxxxxxxx