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

Re: Long strings in CI ///



Carl,

You're right (as usual). I needed this for some HTML coding I'm doing, which involves replacing short tags with longer ones. E.g.,:

replace:

with:
.................................
................................
......">

So it's not an all-purpose tool.

I could fairly easily modify it to be the all-purpose tool, but I'm too busy to do that just now.

"t.x" is the name I chose for the test file containing, in the case of your example, the original, shorter section from Lincoln. I already have a lot of files named things like "test" "tst" "t" and so on, so I wanted to give it a non-overlapping name.

I was surprised that it took so long (5 seconds) to run--even with DX freezing the display. Do you know why it wouldn't be faster?

Regards,
Harry




Reply to note from Harry Binswanger Wed, 01 Dec
2010 14:01:49 -0500

> Okay, it was dumb user error. It takes 5 seconds to run, but it
> works. A limitation is that you have to take as the "find"
> string, something that's fairly short. I took "With malice ".

Hmmm, I thought the idea was to replace one long string with another
-- or, rather, to handle any combination of find and replace strings
that's too long for the CMline. The need to use a short find string
is a crippling limitation, in my view. Also, I can't test your code
as it makes assumptions that do not apply to me -- e.g., the
existence of file T.X -- whazzat?) I tried running it once, but
XyWrite came crashing down. However, if it works for you, Harry....

--
Carl Distefano
cld@xxxxxxxx


Harry Binswanger
hb@xxxxxxxx