Sergey -
This is a great idea and much simpler than my previous approach. But after creating the file this way and then opening it with notepad, the carriage returns (CHR(13)) are ignored. They appear to present OK if the file is opened with WordPerfect but not with notepad which I expect most users will want to use. The chr(13) seemed to work OK when the file was created with the other method. I tried the optional flags without success. Is there a better ascii code other than chr(13) that I should be using for a CRLF?
Any insights into this one?
>Even better, you can use STRTOFILE()
>STRTOFILE(cMessage, "Myfile.txt" )
>
>
>>Thanks Sergey, I thought I remembered something like that.
>>
>>>See SET MEMOWIDTH command
>>>
>>>>Is there a setting somewhere that controls the maximum length of a string without a carrige return?
>>>>
>>>>I have a loop that builds a message string as in
>>>>
>>>>
>>>>cMessage = chr(13)
>>>>scan
>>>>..do some other stuff
>>>>cMessage = cMessage + 'more data' + chr(13)
>>>>endscan
>>>>
>>>>I then output the message with a simple
>>>>
>>>>set alternate to 'Myfile'
>>>>set alternate on
>>>>? cMessage
>>>>set alternate off
>>>>set alternate to
>>>>
>>>>
>>>>The result file has unwanted hard returns inserted into the middle of each line. I've never seen this before and and wondering how to fix.
>>>>
>>>>Thanks for any help here.
>>>>-Don