Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IsNumeric - VFP analogue?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00307922
Message ID:
00309465
Vues:
47
George/Nadya,

PMFJI, but ... would something like the following work better than using the low-level file functions?
lcString = FileToStr( "Description.TXT" )
_CLIPTEXT = STRTRAN( lcString, CHR(10),"" )
Just a thought,

>> I've tried to modify this code a little, and, unfortunately, mine doesn't work.
>>1) I've created a test file Description.txt with few lines in it.
>>2) _CLIPTEXT=filetostr('Description.txt') - this doesn't work. Now _CLIPTEXT is only last string.
>>
>> What should I do?
>
>You'll probably have to bring the string into _CLIPTEXT one line at a time via the low level file functions. What's happening is that when you create a text file an additional character (CHR(10)) is added at the end of each line. So your file actually reads something like: "Line 1." + CHR(13) + CHR(10). Look at FOPEN(), FGETS() and FCLOSE(). What you'll have to do, is bring the string in line by line (that's why FGETS() rather than FREAD()) and concatenate the string yourself.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform