Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EOF marker in csv, text files
Message
De
13/08/2001 09:04:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00542920
Message ID:
00542956
Vues:
19
>Hilmar,
>I'm sorry that my post was against your rules but it's actual working code that person can use right away. Yes, I've 2.6 version of Filetostr and Strtofile but I don't see a reason to rewrite working code.

Not "against my rules"; this was simply a suggestion. And this suggestion doesn't seem to apply to your case: actual working code. I agree completely: it isn't worth the trouble to rewrite it.

My suggestion would apply, rather, to any case where a quick solution is offered for VFP6, and someone complains "But I use VFP5!". Or earlier.

Hilmar.

>
>>>In VFP 6 it can be done in a few lines of code
lcData = Filetostr("Myfile.csv")
>>>IF ASC(RIGHT(lcData,1)) = 26    && make sure that its CTRL+Z
>>>  = Strtofile(LEFT(lcData, LEN(lcData)-1), "Myfile.csv")
>>>ENDIF
>>
>>Sergey,
>>
>>Instead of posting or using two different versions of a program, one with, one without, FileToStr() or StrToFile(), I suggest to always use FileToStr() and StrToFile(), even in older versions of VFP. These functions are so extremely handy that it is worthwhile to define them as UDFs in older versions - in fact, I wonder why I didn't create something similar before the advent of VFP6!
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform