Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to Text File to Retain Trailing Spaces
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00739440
Message ID:
00739462
Views:
21
AFAIK, if the field contains NULL, then you get "", otherwise spaces retain.
Then in the file one can distinguish NULL and empty field.
So you need to represent NULL as empty field in the file? If so, here is one of the solutions:

lcstr=filetostr(textfile)
?strtofile(strtran(lcstr,[""],[" "]), textfile)

>Yuri,
>
>I was referring to the 'copy to delimited'.
>
>>How do you 'copy to text file'? [Copy to ... delim] should do what you need.
>>
>>>Is there any way to have a 'copy to text file' retain trailing spaces?
>>>
>>>For example, assuming that there is one character field in the source file and that the field contains all spaces (as opposed to null), the result in the output text file is "" (literally).
>>>
>>>Is there any way to force the spaces to be within the quotes?
>>>
>>>TIA.
Previous
Reply
Map
View

Click here to load this message in the networking platform