[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
FAUX CODE
XY-> Carl Distefano:
XY-> Because I'm *such* a nice guy, I've posted a version of FAUXCODE that
-> will run in XyWrite III+. It's enclosed with a public message on the
-> TTG BBS. Chet'll tell ya what the message number is.
Ha! Well I'll just wait till the next version of fauxcode.pm
before calling TTG because I expect--by tomorrow--there'll be
another version.
XY-> Chet, we could land on a separator that would flag functions. If
-> Ascii-11 () is E-mailable, I'd use that. Eleven's the function-search
XY-> Lemme know if the Ascii-11 (in parens in the preceding paragraph) comes
-> through. If it does, I'll incorporate it. If not, what separator
-> would you suggest?
Carl,
No, it didn't come out but I like the idea in your following post
better. But I did test fauxcode in Xywin, which, as you
suspected, returns rather erratic results. It's almost as if
something is being scrambled or as if insert mode is being turned
on and off.
On the other hand, I ran the new version of fauxcode on my
current version of the 1-space-to-2 program in Xy 4 and got
excellent results. The coding, via a file compare, was
consistent; the only error in going back & forth between versions
is the addition of extra close parentheses in the text
description. Anyway, here's the fauxcode version of the code:
Note: the only ENTERS aside from the one defined in SV20 should
be doubles; singles are thrown in for the sake of margins in mail
and should be deleted.
---------------------------------------------------------
{LB-space3.pm, for Xy4, to add two spaces after a sentence, by
Chet}DX {GL-var}
{LB-var}{SV10, }{SV12, }{SX17,0}{SV20,
}{SV41,BCDEFGHIJKLMNOPRSTUVWXYZA}{SV42,Mr.Mrs.Ms.Jr.Dr.Prof.}
{SV43,0123456789}{SV60,[027]S}{SV70,[027]A}
{SU95,BC DO }TF {GL-mainloop}
Well, Carl, if you're going to be pleasant enough to say how to
add the wild characters to the DX, why not oblige? And making
use of the sentence wild character (sorry 3+), we can define what
we mean by an end of sentence: terminal punctuation, separator,
wild alpha, separator. This reduces a number of lines, and we
needn't be concerned about periods in the middle of
abbreviations.
Note that the strength of XyWrite is that the sentence separator
(should!) mean whatever you want it to mean via one's separator
table; therefore, it can be any punctuation mark.
{LB-mainloop}BX (se /[w.][wS][wW][wA][wS]/){IF{ER}}{GL-end}
{EI}CL DF PW PW DF {SV77}XD NW {GL-word}
I would have continued with a wild return but going back 2 words
works (whereas the results of seb and multiple wild characters
doesn't seem that accurate). Afterward one jumps a word to get
past the sentence mark.
{LB-word}{IF({IS12}[238]{IS77}=>0)!({IS20}[238]{IS77}=>0)}
{GL-mainloop}{EI}{GL-break}
The two XSs below extract all our information: 72 becomes the
first letter of first word and 61 is the entire last word.
{LB-break}{XS77,60,61,62,63}{XS63,70,71,72,73}{GL-cap}
If first letter is a cap, check previous word.
{LB-cap}{IF({IS72}[238]{IS41}=>0)}{GL-ask}{EI}{GL-mainloop}
If previous word is an initial cap or an abbreviation, return to
main loop. Could be a problem with alphabetic acronyms. Perhaps
scramble the order of 41 or add separator marks to the list.
{LB-ask}{IF({IS61}[238]{IS41}=>0)!({IS61}[238]{IS42}=>0)}
{GL-mainloop}{EI}{GL-place}
{LB-place}BX (seb / /){IF{ER}}{GL-abort1}{EI}{PV10}
{GL-mainloop}
{LB-abort1}{GT95}{PRUnexpected missing space--aborted}{EX}
{LB-abort2}{GT95}{PRNothing at start of file?}{EX}
{LB-end}{GT95}{PRFinished, more or less}{EX}
--------------------------------------------------------------
If this keeps up, I'll have to write something new.
--Chet
---
? SLMR 2.1a ? Art + write + dtp = chet.gottfried@xxxxxxxx