Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a carriage return to a text string
Message
From
14/10/2014 02:38:11
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609291
Message ID:
01609296
Views:
54
>I want to add a carriage return to the end following string what is the format +"
>
>
>+'"'+sstate+'",';
>+'"'+ccountry+'",';
>+'"'+czip+'",'

General solution (Al puts out the why and why not)
If the end of line is CR or LF or CRLF depends a bit on the system you target. If in Windows a CRLF is most suitable.
lcx = '"'+sstate"+'",';
+'"'+ccountry+'",';
+'"'+czip+'",'+CHR(13)+CHR(10)
looks a bit better:
#DEFINE CRLF CHR(13)+CHR(10)

lcx = '"'+sstate"+'",';
+'"'+ccountry+'",';
+'"'+czip+'",'+CRLF
*same, with literal instead of function
lcx = '"'+sstate"+'",';
+'"'+ccountry+'",';
+'"'+czip+'",'+0h0D0A

#DEFINE CRLF 0h0D0A

lcx = '"'+sstate"+'",';
+'"'+ccountry+'",';
+'"'+czip+'",'+CRLF
other solution to consider
TEXT TO lcx NOSHOW TEXTMERGE  
"<<sstate>>","<<ccountry>>","<<czip>>"

ENDTEXT &&lcx 
Update: Replaced 0h00D0A with 0h0D0A
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform