[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: My XPL advice required
- Subject: Re: My XPL advice required
- From: Eric Van Tassel 101233.342@xxxxxxxx
- Date: Wed, 14 Apr 1999 13:59:40 -0400
Carl Distefano's answer to my problem about inserting a word count into a
file as a text string was (of course) just what I needed, with one small
exception.
I reported that I was getting crazy word counts. Carl explained:
>Recall that has a dual function: after a WC command, it
>returns the Word Count; after a CHange command, the number of
>changes. The problem with your routine is that you're not executing
>a WC command before saving the VAlue of $WC. Those crazy "word
>counts" are no doubt the results of the last search-and-replace
>operation you performed! The solution is to move the cursor to TF
>and execute BC wcXC (or BX wcQ2 , if you're in Xy4). Only then are
>you ready to record >.
(I should have suspected something along these lines, because the crazy
word count (a) never appeared the first time I ran the routine after
booting up XyW, (b) was always a smallish number, such as 11 or 15, and (c)
was not infrequently zero.)
However, when I begin the routine by executing BC wcXC, I get an onscreen
message which has to be cleared by hitting the Any key: not a serious
problem, but a nuisance all the same. I've kludged my way around this by
inserting BC es 1XC at the beginning of the program and BC es 0XC at the
end.
The same Any-key problem arises if I use Carl's BX wcQ2 instead of BC wcXC.
Cheers
Eric Van Tassel
P.S. I do use Xy4, but I never think of using the BX...Q2 route instead of
BC...XC, even though it's more elegant and occasionally has actually been
the solution to XPL problems. I guess I don't *completely* trust BX...Q2
because I can't see what's happening: is this irrational attitude on my
part a response to the pathological secretiveness of MS Word?