Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing extra blanks in a memo field
Message
From
04/04/2000 16:44:44
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
 
 
To
04/04/2000 16:37:13
Charles Richard
Nvo Management Systems
Boisbriand, Quebec, Canada
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00355212
Message ID:
00355274
Views:
25
Re posting the code with SPACE() i/o quotes - thanks to Michael Dougherty for pointing out how UT handles double spaces.

PROCEDURE cleanmemo
LPARAMETERS memotext
LOCAL newtext
m.newtext = CHRTRAN(m.memotext, CHR(13), SPACE(1))
m.newtext = CHRTRAN(m.newtext, CHR(10), SPACE(1))
m.newtext = ALLTRIM(STRTRAN(m.newtext, SPACE(2), SPACE(1)))

IF .NOT. (m.newtext == m.memotext)
m.newtext = cleanmemo(m.newtext)
ENDIF
RETURN m.newtext

BTW: Can someone explain to me how to use the PRE coding tags explained in item 5 of basic notes of the rules of conduct?
Charles Richard
NVO Management Systems
crichard@nvo.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform