Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to programmatically update multi-line memo fiel
Message
 
 
To
26/08/2001 07:33:52
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549121
Message ID:
00549257
Views:
17
>>It should be chr(13) + chr(10) instead of chr(10) + chr(13)
>>< SNIP >
lcProps = lcProps + aProps(i) + <b>chr(13) + chr(10)</b>
>>< SNIP >
>
>Hi Sergey,
>
>Maybe I'm slow this AM, but what is the difference with the ordering of the CRLF pair? Does it indeed work differently?

Hi Jim,

As you know, chr(13) + chr(10) combination is the standard end of the line in DOS/Windows an it's what foxpro puts in memo field when you press enter. I always use it because all foxpro command/function/tools treat it the same way.
Here's a simple test that shows that it's not the case with chr(10) + chr(13)
lcCRLF = chr(13) + chr(10)
lcLFCR = chr(10) + chr(13)
lcS1 = "Line 1"
lcS2 = "Line 2"
lcS3 = "Line 3"

? lcS1 + lcCRLF + lcS2 + lcCRLF + lcS3 + lcCRLF
? lcS1 + lcLFCR + lcS2 + lcLFCR + lcS3 + lcLFCR
* the above two lines produce the same result 
CREATE TABLE temp (m1 memo)
APPEND BLANK
REPLACE m1 with lcS1 + lcCRLF + lcS2 + lcCRLF + lcS3 + lcCRLF
MODIFY MEMO m1    && Looks the same as in ? command
APPEND BLANK
REPLACE m1 with lcS1 + lcLFCR + lcS2 + lcLFCR + lcS3 + lcLFCR
MODIFY MEMO m1    && Extra empty lines
Some people're saying that CHR(13) is enough in memo field and it works but not always. Take a look at Thread #549166.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform