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

Re: Much easier way to do file comparison



** Reply to message from Harry Binswanger  on Sun, 06 Nov 2005
02:13:22 -0500

Harry:

Nice! Yields an interesting result. But it has a
fundamental conceptual flaw: you are accurately
highlighting the changes in document #1, but there may be
vast amounts of text that are _additional_ in document #2
which go completely unrecognized by the highlighting. In
other words, you're showing what is dissimilar
(added/changed) in the first document, but not what is added
in the second (and/or what was subtracted in the first). Result:
somewhat less than half the loaf. The reason I proposed a
simultaneous compare with two visible windows was precisely
to show all differences, at once. If you're going to ignore
the additions in the second doc, and/or the subtractions
in the first doc, why do a compare at all?

I also have some technical suggestions, if this scheme is
really the one you want to adopt:
-- There's no reason to keep toggling (func AS) back and
  forth between alternate screens. Just stay in your
  primary document during the entire compare operation --
  you get the identical result
-- In a public program (you just made it public), you're
  usurping ordinary Save/Get 5, which may be in use. Use a
  transient Save/Get instead, like 01 (or 05, if the number
  5 has some resonance); it won't affect the user, and it
  will dump the memory you just committed when the program
  ends
-- On an Abort on the second query, you don't restore the
  status ante quo (func WG) for document #1
-- There's no reason to disturb the command line -- use
  PRompts
-- You could take numerous economies. For example:

XPLeNCODE v2.0
b-gin [UNTITLED]
{<}SV01,FIRST{>}{<}SX02,2{>}{<}CUA,02{>}{<}SU03,{<}SX04,"Is t
his window showing the "+{<}IS01{>}+" file to compare? (-/n)"
{>}{>}{<}GT03{>}{<}PR@04{>}{<}SX04,{<}RC{>}{>}{<}IF@UPR({<}IS
04{>}){240}"N"{>}{<}IF{<}IS01{>}{240}"E"{>}[AS_][WG_]{<}
EI{>}{<}PRAbort{>}{<}EX{>}{<}EI{>}[XP_][TF_][DO_][FF_][AS_]{<
}SV01,SECOND{>}{<}LBA{>}{<}IF{<}VA$FE{>}<1{>}[FM_]{<}MD-27{>}
[FD_]{<}MD+27{>}{<}GLA{>}{<}EI{>}[TF_][WG_][AS_][TF_][WG_][AS
_]{<}EX{>}
-nd
XPLeNCODE

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