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 01:52:51
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
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:
01609294
Views:
76
>I want to add a carriage return to the end following string what is the format +"
>
>
>+'"'+sstate+'",';
>+'"'+ccountry+'",';
>+'"'+czip+'",'

Carriage Return (CR) is CHR( 13 ).
Line Feed (LF) is CHR( 10 ).

There are a few places where you want to use just CR for going to a new line e.g. when building long, multi-line messages for the MESSAGEBOX() function.

If you're building a text file and you want other applications to accept that text ends at one point and resumes at a new line later, you generally need to add the so-called CRLF combination i.e. you would add CHR( 13 ) + CHR( 10 ) to the end of each line.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform