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

XPL FUNCTIONS





 -> Joel Roth :

XY-> I find it easier to use other programs for text processing,
 -> simply because they provide more sophisticated functions for
 -> text manipulation and flow control. So instead of suffering
 -> writing text processing routines in XPL, I now suffer writing
 -> them in perl. :-) But of course I use XPL macros whenever I need
 -> them.

How 'bout more of a description of perl?

XY-> [I also said it would be a "nightmare" to use XPL to put double
 -> spaces after sentences but not after abbreviations.]

XY-> > Why should it be a nightmare? Carl D. has probably

XY-> You're correct, it isn't *that* difficult, and I'll definitely
 -> have a look at Carl D.'s files. Are they on the listserv?

If not on the listserv, definitely at the TTG BBS.

XY-> But since the point of the list is to educate. Let's just
 -> compare these two:

XY-> Annie Fisher provided this soothing example.

"Soothing" . . . Annie? . . . "soothing" . . . ????? (Am I on the right list?)

XY->     BC ci _. _. _{LBcr1}XC {if@not({er})}{GLcr1}
 ->     {ei}BC ci _? _? _{LBcr2}XC {if@not({er})}{GLcr2}

[and so on]

XY-> SNR uses a table that looks something like this:

XY-> \ This table prepares doc files with two spaces after a full
stop
 -> \ 12/15/94 Isolated LFs have now been removed.
 -> \\L8
 -> \0D\0A=\0D\0A   \ keep CRs as is
 -> \0A=        \ delete linefeeds
 -> \. =.\20\20    \ 2 spaces = 2 spaces
 -> \. =.\20\20     \ 1 space = 2 spaces
 -> \
 -> \         The following lines end with a space and
CR
 -> Mr. =Mr.

[and so on]

As given, both examples are the same: simply the inverse of each
other. Anne's looks at terminal punctuation, yours at
abbreviation. For Annie, she'd have to add more conditions for
such combinations as period + quote or ellipsis; for you, you'd
need to identify all the abbreviations in use.

Basically, however, what isn't taken into account in either is
the type of punctuation being used, such as if a question mark or
exclamation point is interlinear. It's one of the reasons
I'd prefer a program that examined the area around would-be
terminal punctuation to determine what's going on. But I doubt
whether anything, English being what it is and house standards
being god knows what, would be 100 percent effective.

XY-> SNR does all the substitutions in one pass. I didn't even think
 -> about question marks and exclamations! Shows you how boringly
 -> sober and unreflective my work is!! :-)

Perhaps the people you work with never use question marks or
exlamations!?

XY-> > In XPL you get what you write.

XY-> Same applies in perl and many other languages. Even WP has a
 -> decent macro language for many purposes.

The basis for XPL in Xy is the speed with which one can do
massive changes. If you want to convince XPL hard-liners that
perl is equally or more effective, you should try providing test
results (with timings) for similar types of programs in
XPL and perl--that is, if you want to.

--Chet
---
 ? SLMR 2.1a ? Art + write + dtp = chet.gottfried@xxxxxxxx