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

Re: Countchars



Reply to note from "George Scithers" 
Wed, 9 Feb 2005 14:48:22 -0500

> Counting "words" this way credits very short lines as if they
> were full-length lines -- but a short line takes up as much
> room on a printed page as a full-length line does.

Makes sense. If I understand the "printer's rule", once you've
established your margins, it boils down to a matter of counting
lines. Am I right? If so, getting a line count with XPL is a
straight-forward affair. In Xy4 and later, it would look like this:

XPLeNCODE v2.0
b-gin [UNTITLED]
;*; Count lines in file (cursor to EOF) or DeFined block[cr|l
f]{<}IF{<}VA$WS{>}<>1{>}{<}PRNo file{>}{<}EX{>}{<}EI{>}[BX_]e
s 1[Q2_][GT_]{<}SX01,99999999{>}[DZ_]{<}IF{<}VA$DE{>}>0{>}{<}
SX01,{<}VA$DN{>}{>}[DB_]{<}EI{>}{<}SX50,{<}CP{>}{>}{<}SX02,0{
>}[DX_]{<}LBa{>}{<}SX03,{<}CP{>}{>}{<}IF{<}PV03{>}<{<}PV01{>}
{>}[CD_]{<}IF{<}CP{>}>{<}PV03{>}{>}{<}SX02,{<}PV02{>}+1{>}{<}
PR@02{>}{<}GLa{>}{<}EI{>}{<}EI{>}[BX_]jmp {<}PV50{>}[Q2_][BX_
]jmp {<}PV50{>}[Q2_]{<}SX01,"Number of lines = "+{<}IS02{>}{>
}{<}PR@01{>}{<}EX{>}[cr|lf][cr|lf]
-nd
XPLeNCODE

Then, multiply by 10 to get the imputed number of "words". Unless I
misunderstand.

--
Carl Distefano
cld@xxxxxxxx