Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting carriage return in memo field
Message
 
À
31/07/1998 15:15:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00123123
Message ID:
00123211
Vues:
14
>This is what I came up with. I'm finding CHR(13)+CHR(10) and replacing it with '\n'. The only thing is that cComment is not continuous string, looks like this:
>
>Comment Line 1\n
>Comment Line 2\n
>Comment Line 3
>
>I need it to look like this:
>
>Comment Line 1\n Comment Line 2\n Comment Line 3
>
Chris,
I'm sorry I don't have more time right now but here are a few suggestions.
1. In place of the substr fuctions use the STUFF() command. I know it's hard to understand to start with but you would only need one funcion instead of two substr funcions plus the other stuff.

2. Put your results to a mem var or new memo and again check it with at(). Your problem is most likely due to using an incorrect offset. ie. Starting at the wrong place in the string for the replace. Every time I do this stuff it takes me a while to get the offset right. Try to start one chr to the right or left. Also try a wait window str(asc( string )) with the string you are going to replace and see if it really is chr(13) or 10.

John.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform