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

Re: LH vs. SAve



Robert wrote:
> you can't just hit ctrl-S

And what, pray, is Ctrl-S? Why refer to keystroke instead of
assignment?

Okay, okay. I normally don't sin here, but Ctrl-S is so universal now for SAve.
And instead of native SA/NV, I do a lot of additional
"thinking". Here's the routine I call (modified since the last
version of U2 was issued) -- with explanations below:
That's another step forward, thanks. Note, however, that $MO is *not* moved
from 0 to 1 by doing a single CC.

If you're in an explanatory mood, I have some questions.

1. Why the SUbroutine 01 when it is called only once?
2. Why not have an before the first ? Is that to allow for having a zap26 call when the original window was [UNTITLED]? 3. Is there any reason to use "in" vs. "contains" (238 vs. 240)? Are they exact inverses of each other?

--Harry
nn=NOJM2,.,s,a,v,e,2,6,Q2

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5save26}} SAve with optional ZAP26 (if "z" on CMline), opt
ional multi-session SAves if DUO is active RJH LastRev.1/2/0
8[cr|lf]{002}{<}IF{<}VA$FI{>}{240}"["{>}[JM_]2.af[Q2_]{<}EI{>
}{<}SU01,{<}SX05,@UPR({<}IS00{>}){>}{>}{<}GT01{>}{<}SX07,{<}V
A$MO{>}{>}[BX_]es 1[Q2_][BX_][Q2_][BX_]sa/nv[Q2_]{<}IF{<}VA$E
R{>}==11{>}{<}IF{<}PV07{>}>0{>}[BX_]wait[Q2_]{<}PRSaved{>}{<}
LBA{>}[BX_]p[Q2_]{<}IF{<}IS05{>}=="Z"{>}[JM_]2.zap26[Q2_][BX_
]p[Q2_]{<}EI{>}[BX_]es[Q2_]{<}IF{<}VA$WS{>}==1&{<}PV07{>}>0{>
}[JM_]2.duo/r[Q2_]{<}EI{>}{<}PR {>}{<}EX{>}{<}EI{>}{<}PRProce
ed{>}{<}GLA{>}{<}EI{>}{<}SX01,{<}VA$ER{>}{>}{<}SX01,"{<}PR\"+
{<}IS01{>}+"{>}"{>}{<}PV01{>}{002}[cr|lf][cr|lf]
-nd
XPLeNCODE

What does it do?

1) If the window is "[UNTITLED]", the file is saved with a
unique "date-stamp" filename (using frame AUTOFILE or AF).

2) The CMline is captured in S/G 05 -- does CMline = "z" or
"Z"? -- for use in 7) below.

3) Whether the file has been MOdified or not is captured in
S/G 07 -- I don't waste time forcing a SAve on files that
haven't been modified -- if I need to do that (because
XyWrite hasn't modified it, but some external operation
has, and I want to revert), I just use U2 frame SANV directly.

4) I set the internal last-ERror number to 11.

5) SAve without verification.

6) If NO CHANGE to the ERror value:

  7) If "Z|z" appears on CMline, I remove the terminal EOF
  (old DOS Control-Z or ^Z, Ascii-26) character from the file
  (using frame ZAP26).

  8) If additional XyWrite sessions are running, I
  synchronize any occurrence of the same file in other
  session window(s) and force them to update as well
  (frame DUO).

       **OR**

6) If CHANGE to the ERror value, i.e. an error while saving:

  7) Report the error and abort.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------


Harry Binswanger
hb@xxxxxxxx