Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CHR(13) not causing line break in StrToFile() output
Message
De
13/07/2007 11:15:12
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01239118
Message ID:
01240238
Vues:
29
>>The CHR(13) is not breaking the line in my output. Do I also need CHR(10) with it? What is the rule?
>>
>>
>>STRTOFILE(ALLTRIM(STR(iCount)) + ': ' + TRANSFORM(oSeg.elements[iCount]) + CHR(13),"strConvertedData.txt",.T.)
>>
>
>Yes, it never would hurt to add chr(10). The output may be seen differently in different editors, but chr(13) + chr(10) will always work unless it's for e-mail body in ShellExecute.

Yes, chr(13)+chr(10) also called CRLF (carriage return line feed) is the typical windows new line. In Excel cells you should use LF=Chr(10) only. In a vfp editbox value you can use both the CRLF combination or LF only. But typing [ENTER] in the editbox will create CRLF in the editbox value.

In Unix/Lunix CHR(10) only is typical. I often use WordPad instead of NotePad to read txt,php,html etc. files which come from there, because it can handle this. CR=Chr(13) alone is MAC specific. So you're not wrong, just using the wrong OS... ;-)

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform