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

Re: typing lower case



Reply to note from "Morris Krok"  Wed, 15 May
2002 09:41:26 -0700

> Please decode Herb Tyson's capital.pm program which I amended
> slightly.

The question that intrigued me was: Did AU stay broken for all those
years because it was hard to fix, or was it just overlooked? To
satisfy myself that it couldn't have been *that* hard, I wrote a
little XPL demo program that fixes it. It's a only a demo because
it's not practical, IMO, to do "real-world" AU via XPL; to be
usable, it really has to be a built-in facility. Still, the demo
shows that the fix would have been no big deal: the guts of the
program (labeled "AU procedure") is all of 200 bytes long. Shades
of what might have been....

To run the demo, issue DECODE to decode what's below. Save
it to a separate file; I call it AU.PM. Open a file, run the
program, then type a few sentences. Try some that stump native AU,
e.g., sentences with "e.g.," and sentences that start with quotation
marks or parens. Hit Escape to quit.

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}GLa{>}[cr|lf]Auto-Uppercase Simulation Using XPL[cr|lf]Dem
o for XyWrite 4+ [C.L.Distefano 5/15/02][cr|lf][cr|lf]Usage:[
cr|lf]-----[cr|lf]1) Turn off the native AU facility.[cr|lf]2
) Open a file.[cr|lf]3) RUN AU.PM[cr|lf]4) Type a few{32}
sentences. Try some that stump the native AU function:[cr|lf
]  for example, sentences that begin with parens or quotatio
n marks, and[cr|lf]  sentences that include internal abbrevi
ations (e.g., i.e., etc.).[cr|lf]5) Hit Escape to quit.[cr|lf
]---------------------[cr|lf][cr|lf]{<}LBa{>}[XH_]{<}IF{<}VA$
WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>}[BX_]es 1[Q2_][GT_]
;*;[cr|lf];*; Workaround for non-standard hyphen, space, peri
od and Enter keys[cr|lf]{<}SV01,|12=-|28=[cr|lf]|52=.|57= |10
4=[cr|lf]|{>}{<}SU02,{<}SX03,{<}RK{>}{>}{<}SX04,{<}VA$KC{>}{>
}{<}IF{<}PV04{>}<2{>}{<}PRDone{>}{<}EX1{>}{<}EI{>}{<}IF{<}IS0
1{>}{240}("|"+{<}IS04{>}+"="){>}{<}SX04,"|"+{<}IS04{>}+"="{>}
{<}XS01,04,,04,04{>}{<}SX03,{<}VA@04|1{>}{>}{<}EI{>}{>};*;[cr
|lf];*;[cr|lf]{<}SX05,1{>}{<}LBb{>}{<}PR|Auto-Uppercase simul
ation: Type a few sentences. Escape quits{>}{<}GT02{>};*;[cr|
lf];*;[cr|lf];*; AU procedure:[cr|lf]{<}IF".!?[cr|lf]"{240}{<
}IS03{>}{>}{<}PV03{>}{<}SX05,1{>}{<}IF{<}IS03{>}=="[cr|lf]"{>
}{<}GLb{>}{<}EI{>}{<}GT02{>}{<}IF@upr({<}IS03{>})<{<}IS03{>}!
",;-"{240}{<}IS03{>}{>}{<}SX05,0{>}{<}EI{>}{<}PV03{>}{<}GLb{>
}{<}EI{>}{<}IF@upr({<}IS03{>})<{<}IS03{>}{>}{<}IF{<}PV05{>}>0
{>}{<}SX03,@upr({<}IS03{>}){>}{<}SX05,0{>}{<}EI{>}{<}EI{>}{<}
PV03{>}{<}GLb{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

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