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

Re: defining words



Reply to note from cld@xxxxxxxx (myself) Sat, 4 Oct 2003 19:51:17
-0400

Myron:

In my last post I said re frames DWonly and DWonly2:

> the DeFine now includes a closing MoDe statement if it
> immediately follows the DeFined word.

That's good if the word starts and ends with a MoDe statement. But
it further strikes me that if a word starts with a MoDe statement
but *doesn't* end with one, then the DeFined word should NOT include
the starting MoDe statement. That's another way in which the native
func DW DeFines too much.

The revisions to DWonly and DWonly2 below fix that as well; please
use them in place of the ones dated 10/4/03. Frame
RemodeWordOrBlock, repeated below, is unchanged (still dated
10/4/03); recall that it requires frame Remode, which I posted a few
days ago.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5RemodeWordOrBlock}} Change MoDe of current word or DF blo
ck [CLD 10/4/03][cr|lf]{002}{<}IF{<}VA$DT{>}<1!{<}VA$DT{>}==8
{>}{<}PRNot available in eXPanded view{>}{<}EX{>}{<}EI{>};*;[
cr|lf][DZ_]{<}IF{<}VA$IN{>}<1{>}[JM_]2.DWonly2[Q2_]{<}SX50,@i
nt(({<}VA$DN{>}-{<}VA$DS{>})/2){>}{<}IF{<}PV50{>}<1{>}{<}SX50
,1{>}{<}EI{>}{<}SX50,{<}VA$DS{>}+{<}PV50{>}{>}[JM_]2.ReJuMP[Q
2_]{<}EI{>}[JM_]2.remode[Q2_]{002}[cr|lf][cr|lf]{{;5DWonly}}{032}
DeFine Word only (no trailing separator, etc.) [CLD rev. 10/5
/03][cr|lf]{002}[YD_][DW_]{<}SV01{>}{<}LBa{>}{<}SX01,{<}IS01{
>}+"[255+192+142]"{>}{<}SV02,{027}S[255+192+142]{>}{<}SV03,{>
}{<}XS01,02,02,03,04{>}{<}IF{<}VA|03{>}>0{>}{<}SX01,{<}IS02{>
}{>}[CL_][DM_][DZ_]{<}GLa{>}{<}EI{>}{<}IF("{<}MD"{238}({<}IS0
1{>}+"{>}")==0{>}{<}SU02,[DX_][TG_]{>}{<}IF{<}VA$DT{>}<1!{<}V
A$DT{>}==8{>}{<}SU02,{>}{<}EI{>}{<}GT02{>}{<}SX03,{<}VA$DS{>}
{>}{<}SX04,{<}VA$DN{>}{>}[DE_][YD_][DF_][CR_][CR_][CR_][DF_]{
<}SV05{>}[YD_]{<}IF"{<}MD"{238}({<}IS05{>}+"{>}")==0{>}[BX_]s
e [w>][Q2_]{<}SX04,{<}CP{>}{>}{<}LBb{>}[BX_]jmp {<}PV04{>}[Q
2_][DF_][BX_]jmp {<}PV03{>}[Q2_][DF_]{<}GT02{>}[DE_][FF_]{<}E
X{>}{<}EI{>}[BX_]jmp {<}PV03{>}[Q2_][BX_]se [w>][Q2_]{<}SX03
,{<}CP{>}{>}{<}GLb{>}{<}EI{>}{002}[cr|lf][cr|lf]{{;5DWonly2}}
 DeFine Word only (no trailing separator, etc.) [CLD rev. 10/
5/03][cr|lf]{002};*; This variant DeFines hyphenated expressi
ons from cursor onward[cr|lf][YD_]{<}SX01,-1{>}{<}LBa{>}[DW_]
{<}SV02{>}{<}IF({<}IS02{>}+"[255+192+142]"){240}"-[255+192+14
2]"{>}{<}IF{<}VA|02{>}-{<}PV01{>}>1{>}{<}SX01,{<}VA|02{>}{>}{
<}GLa{>}{<}EI{>}{<}EI{>}{<}LBb{>}{<}SX02,{<}IS02{>}+"[255+192
+142]"{>}{<}SV01,{027}S[255+192+142]{>}{<}SV03,{>}{<}XS02,01,
01,03,04{>}{<}IF{<}VA|03{>}>0{>}{<}SX02,{<}IS01{>}
{>}[CL_][DM_][DZ_]{<}GLb{>}{<}EI{>}{<}IF("{<}MD"{238}({<}IS02
{>}+"{>}")==0{>}{<}SU01,[DX_][TG_]{>}{<}IF{<}VA$DT{>}<1!{<}VA
$DT{>}==8{>}{<}SU01,{>}{<}EI{>}{<}GT01{>}{<}SX03,{<}VA$DS{>}{
>}{<}SX04,{<}VA$DN{>}{>}[DE_][YD_][DF_][CR_][CR_][CR_][DF_]{<
}SV05{>}[YD_]{<}IF"{<}MD"{238}({<}IS05{>}+"{>}")==0{>}[BX_]se
 [w>][Q2_]{<}SX04,{<}CP{>}{>}{<}LBc{>}[BX_]jmp {<}PV04{>}[Q2
_][DF_][BX_]jmp {<}PV03{>}[Q2_][DF_]{<}GT01{>}[DE_][FF_]{<}EX
{>}{<}EI{>}[BX_]jmp {<}PV03{>}[Q2_][BX_]se [w>][Q2_]{<}SX03,
{<}CP{>}{>}{<}GLc{>}{<}EI{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

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