Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting rid of returns 1

Status
Not open for further replies.

fugigoose

Programmer
Jun 20, 2001
241
US
How do I get rid of returns in a Text varible?
I tried this:

repeat with i = 1 to text.char.count
if text.char = RETURN then delete text.char
end repeat

This doesnt seem to work. In the debugger the returns come up as "|" so I tried that with no luck either. Make the returns go away! I want to turn a multiline file into a single line one, basically.
 
Why don't you append all the words into a list?
 
Your code would have worked fine except for this little mistake
repeat with i = 1 to text.char.count
if text.char = RETURN then delete text.char
end repeat

You forgot to write the index of the char in the if statement.

Mayuresh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top