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

Re: Long strings in CI ///



I have made the program and I just tried it on your example.
It failed, but I'll work on it and get back to you.



Reply to note from Harry Binswanger Wed, 01 Dec
2010 09:09:15 -0500

Harry:

> As to my routine, I don't see how it could fail, provided the
> separator (%% in my example) is completely unique.

I still can't visualize it. Let's take a concrete example. Suppose
we have a document consisting entirely of the last paragraph of
Lincoln's Second Inaugural, thus:

-- existing text --
With malice toward none, with charity for all, with firmness in the
right as God gives us to see the right, let us strive on to finish
the work we are in, to bind up the nation's wounds, to care for him
who shall have borne the battle and for his widow and his orphan, to
do all which may achieve and cherish a just and lasting peace among
ourselves and with all nations.
-- end existing --

We want to replace that entire text with the text of the Gettysburg
Address, thus:

-- replacement text --
Fourscore and seven years ago our fathers brought forth upon this
continent a new nation, conceived in liberty, and dedicated to the
proposition that all men are created equal. Now we are engaged in a
great civil war, testing whether that nation, or any nation so
conceived and so dedicated, can long endure. We are met on a great
battlefield of that war. We have come to dedicate a portion of that
field as a final resting-place for those who here gave their lives
that that nation might live. It is altogether fitting and proper
that we should do this. But in a larger sense we cannot dedicate, we
cannot consecrate, we cannot hallow this ground. The brave men,
living and dead, who struggled here, have consecrated it far above
our poor power to add or detract. The world will little note, nor
long remember, what we say here. But it can never forget what they
did here. It is for us, the living, rather to be dedicated here to
the unfinished work which they who fought here have thus far so
nobly advanced. It is rather for us to be here dedicated to the
great task remaining before us, that from these honored dead we take
increased devotion to that cause for which they gave the last full
measure of devotion; that we here highly resolve that these dead
shall not have died in vain; that this nation, under God, shall have
a new birth of freedom, and that government of the people, by the
people, and for the people, shall not perish from the earth.
-- end replacement --

How would your procedure do that?

BTW, I just used BIGCHG (12/1/10 revision) to do this and it worked
fine.

(Obviously it only makes sense to use a routine like BIGCHG where
the subject document contains multiple instances of the search
string. To replace a single instance, cut-and-paste is more
efficient. The above example is for testing purposes.)

--
Carl Distefano
cld@xxxxxxxx


Harry Binswanger
hb@xxxxxxxx