Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsNumeric - VFP analogue?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00307922
Message ID:
00309451
Views:
45
How about:

on key label f5 keyboard filetostr('Description.txt')

>> It works great! Thanks, George.
>>
>> 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.
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform