Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling a text variable with lines ending with cr/lf.
Message
De
04/04/2000 09:20:18
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
 
 
À
04/04/2000 01:16:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00354764
Message ID:
00354919
Vues:
15
>Joe,Only chr(13) would be sufficient.

That's true for the purpose of the editbox, but if you write that string to a file (StrToFile) then without the chr(10) the CR shows up as a black square in a simple editor like Notepad. Without testing the editbox, if it displays correctly using CRLFs, I'd use them because it'll be that much easier to output the strings to a text file. (guessing that the editbox value is stored in a memo field which might be dumped to a text file)

If the editbox is used primarily for display only, it might make the code easier to read to not have all the extra chr(10).

Joe, i usually make a CRLF variable:
CRLF = chr(13) + chr(10)
textline = "Line1" + CRLF + "Line2" + CRLF + CRLF + "Line4" [+ etc.]
If you later wanted to change your 'line-end' characters, you change only the CRLF variable...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform