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

Re: XYENC/XYDEC programs

Carl Distefano wrote on Thu, 08 Jan 2009 00:40:22 -0500
>... use this:

>'01-07-2009 22:53:26
>    _XYENC|XYDEC_utilities_[CLD_1/7/09]'^
>  'BXes_1'Q2'DX'DZ
>  ~>0~>~~>
>    ~~>'JM2.GetPath'Q2
>    ~+"\"+~+"."~>
>    'BXsad/nv_~in'Q2'BXwait'Q2'DE'YD
>    'BXernv_~out'Q2
>    'BXdos/nv/x/z_/c_~com_~in_~out'Q2
>    ~~'BXexist_~out'Q2
>    ~)~>
>      ~
>      ~
>    'BXp'Q2~~~>
>    'BXme_~out'Q2'BXwait'Q2:~M
>    'BXernv_~in'Q2'BXwait'Q2
>    'BXernv_~out'Q2'BXwait'Q2
>    ~~>'JM2.ReJuMP'Q2'DO'FF~
>    ~
>  'YD~~
>  ~

I have a several comments on this:
1. I like the concept. Switching back and forth could be really convenient
for some editing tasks. In a way, it's like switching between normal and
expanded mode in XyWrite.

2. Given that this is working on defined areas, it probably would be
cleaner if all of the Ctrl-Z's at "end of file" could be avoided. When you
save prior to invoking XYENC, it would be better to save without the
Ctrl-Z (EOF) if XyWrite IV will do that, and if not, it might be worth
trying to remove the explicit "~Z" from the merged in encoded file. I
think that XyWrite's merge removes the "real" Ctrl-Z, so I don't know that
there is a "real" problem here, but since the XYENCed program shows any
Ctrl-Z's explicitly, there seems to me to be at least a cosmetic flaw

Moreover, if you convert two different but adjacent defined areas at two
different times and then convert them both back as a single unit, a
superfluous "~Z" at the end of the first area (and hence, in the middle of
the larger area) could cause a real problem, and even a loss of data.

3. The timestamp introduced by XYENC seems to me to be superfluous in this
context. (XYDEC doesn't require such a time stamp, it merely uses one to
time stamp the output file if it finds one (which can be anywhere in the
file). So they can be and should be deleted if they get in the way.)

XYENC won't generate a time stamp if it's input is from STDIN, so you
might try avoiding the timestamp by invoking XYENC with the syntax

  XYENC . fileout