[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Countchars
- Subject: Re: Countchars
- From: cld@xxxxxxxx (Carl Distefano)
- Date: Wed, 9 Feb 2005 23:56:31 -0500
Reply to note from "M.C." Wed, 09 Feb 2005 20:34:45
+0100
Manuel:
Yes, you're right on both counts (so to speak). Spaces are counted,
as are embedded formatting codes. COUNTCHARS counts everything.
If you want the options to exclude formatting and spaces or other
characters -- well, that's easy enough to add. In fact -- done.
Plug in this new frame, please, and give it a try. Instructions for
the new usages are in the frame.
Let me know if it works for you.
XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5countchars*}} Count number of chars|bytes in DF block [CL
D rev. 2/9/05][cr|lf]{002};*;[cr|lf];*; Basic usage (with blo
ck DeFined):[cr|lf];*; COUNTCHARS[cr|lf];*; Option
s:[cr|lf];*; COUNTCHARS/NF excludes embedded forma
tting from count[cr|lf];*; COUNTCHARS -"aBc" exclu
des chars a, B and c[cr|lf];*; (double quotes required)[cr
|lf];*; Options may be combined; e.g.:[cr|lf];*; COUNTCHARS
/NF -"[255+050+048] " (exclude formatting, hard & so
ft spaces)[cr|lf];*; Single wildcards may used to specify cha
rs to exclude[cr|lf];*; COUNTCHARS -"[wN][wS]" (ex
clude numbers and separators)[cr|lf];*; One available window{032}
required for /NF and exclude options[cr|lf];*;[cr|lf][XH_][BX
_]es 1[Q2_][DZ_]{<}IF{<}VA$DE{>}<1{>}{<}PRNothing DeFined{>}{
<}EX{>}{<}EI{>}[DX_]{<}SV51,{>}{<}SV52,{>}{<}SV53,{>}{<}IF@up
r({<}VA$FR{>}){240}"/NF"!"-"{238}{<}VA@50{>}==0{>}{<}SX53,@up
r({<}VA$FR{>}){>}{<}IF{<}VA|50{>}>0{>}{<}SX54,{<}IS50{>}{>}{<
}EI{>}[Q2_]{<}IF{<}VA$WA{>}<1{>}{<}PRNo window{>}{<}EX{>}{<}E
I{>}[DX_]{<}SX55,{<}VA$WA{>}{>}[BX_]func #{<}PV55{>}[Q2_][BX_
]ne/100[Q2_][CP_][TF_][TF_]{<}IF{<}IS53{>}{240}"/NF"{>}[JM_]2
{046}daf[Q2_]{<}EI{>}{<}IF"-"{238}{<}VA@54{>}==0{>}{<}SV55,-{>}{<
}SV51,{>}{<}XS54,55,,55,51{>}{<}SV55,"{>}{<}XS51,55,,54,52{>}
{<}SX52,{<}IS52{>}+"{014}"{>}{<}SV55,"{014}{>}{<}XS52,55,51,,
54{>}{<}SV55,{027}X{>}{<}LBa{>}{<}IF{<}VA|51{>}>0{>}{<}SV52,{
>}{<}XS51,55,,54,52{>}{<}SX51,{<}IS52{>}{>}{<}LBb{>}[BX_]cha{032}
[999]{<}PV54{>}[999][999][Q2_]{<}IF@not({<}ER{>}){>}[BX_]wait
[Q2_]{<}GLb{>}{<}EI{>}{<}GLa{>}{<}EI{>}{<}EI{>}[BF_][BF_][DF_
][TF_][TF_][DF_]{<}EI{>}[XP_][DB_]{<}SX54,0{>}{<}PRWorking...
{>}{<}LBc{>}{<}IF0+{<}VA$IN{>}>0&0+{<}VA$FE{>}<1{>}{<}SX51,{<
}CP{>}{>}[CR_]{<}IF{<}CP{>}>{<}PV51{>}{>}{<}
SX54,{<}PV54{>}+1{>}{<}GLc{>}{<}EI{>}{<}EI{>}{<}SX55,{<}VA$DN
{>}-{<}VA$DS{>}{>}{<}IF{<}VA|53{>}>0{>}[JM_]2.ab/nv[Q2_]{<}EI
{>}[DB_]{<}SX54,{<}IS54{>}+" chars | "+{<}IS55{>}+" bytes"{>}
{<}PR@54{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE
--
Carl Distefano
cld@xxxxxxxx