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

XPL best practices



For some time now I have been trying to polish my Xy to
WordPerfect conversion routine. It still needs work,
notably some error-trapping, but one thing I am
noticing is the enormous difference in the speed with
which two versions operate.

This was my original, quick and dirty method:
ZT >>JM 2.XSRQ2 +".wp">>BX default EP=0 Q2 BX exist xytowp.batQ2 )>BX ERNV xytowp.batQ2 BX waitQ2 BX ne xytowp.batQ2 BX merge xytowp.codQ2 GT TF BC ci /%1//XC TF BC ci /%2//XC BX store Q2 BX default EP=1,1,1,1,1,1,1Q2 >
I added the ZT and VA$ET bits to test speed, and on my
2d-fastest PC (the ASRock box) it takes literally no
time at all: $ET displays as 0:00:00.00; no doubt on
some of the antiques it would give a measure of time.
Later, I tried doing it this way, thinking that merging
existing code and CIing was kludgy:
ZT >>JM 2.XSRQ2
+".wp">>BX default EP=0 Q2 BX
exist xytowp.batQ2 )>BX ERNV
xytowp.batQ2 BX waitQ2 BX ne
xytowp.batQ2 GT @echo off
cd 
W4W17F.EXE  /N /V2
DELAY.EXE 2 {>}nul
if exist  del 
W4W48T.EXE 
DELAY.EXE 2 {>}nul
@echo offBX store Q2 BX default EP=1,1,1,1,1,1,1Q2 >

That yielded $ET (on the same box) of 0:00:06.48
What would seem to be the really correct way to do it--saving each snippet of batfile code to a SG, then PV or IS that into the batfile--bombs, because Xy thinks the "if" statements in the batfile are Xy ifs, and they don't balance.
So should one be fast or elegant? And is MErging and
CIing really so inelegant?

--
Patricia M. Godfrey
PriscaMG@xxxxxxxx