Petro Bochan wrote:

Hi,

I've got to delete extra RETURN characters on each line to reduce the number
of page breaks. When I issue this code it works only with the trace command.
Whatever the combination I've tried it doesn't seem to work. Please help.

try this:

on StripExtraReturns txt
  repeat while true
    off = offset(return & return,txt)
    if off then
      put return into char off to off+1 of txt
    else
      exit repeat
    end if
  end repeat
  return txt
end

It reduces any series of returns to one return


member("foo").text = stripExtraReturns(member("foo").text)

I don't know how fast it is, but it solves the OP's problem.

--

Carl West
mailto:[EMAIL PROTECTED]
http://carl.west.home.comcast.net
----------------------------------
There is nothing in the world that some man cannot make a little worse
and sell a little cheaper, and he who considers price only is that man's
lawful prey.     -- John Ruskin (1819 - 1900)
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to