>>>>>
>>>>>lcx = ''
>>>>>lcDelim = ' '
>>>>>sele one
>>>>>scan
>>>>> lcx = lcx+alltr(cHeader)+lcDelim
>>>>>endscan
>>>>>lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>>>>>
>>>>>sele two
>>>>>scan
>>>>> lcx = lcx+transform(Field1)+lcDelim
>>>>> lcx = lcx+transform(Field2)+lcDelim
>>>>> *..
>>>>> lcx = lcx+transform(Fieldn)+lcDelim
>>>>> lcx = left(lcx,len(lcx)-len(lcDelim))+0h0D0A
>>>>>endscan
>>>>>lcx = left(lcx,len(lcx)-2)
>>>>>
>>>>>strtofile(lcx,'Yourfile.ext')
>>>>>
>>>>>
>>>>>something like this?
>>>>>You can replace TRANSFORM with something mor meaningfull, also remove spaces etc.
>>>>
>>>>Seems to work but every fleld has to be worked on separately because they have differnt lengths and properties - but thanks
>>>
>>>Then instead of transform() you may just do padr(), and you'd only need a list of lengths for each column.
>>>Now if you want to have multiline values, i.e. any wrapping of long values, this will get complicated very fast.
>>
>>How do I denote a carriage return character at the end of each line
>
>0h0D0A is it - the new (relatively, in VFP8 or 9) feature where you can insert a hex constant. Fox introduced this for binaries, but they mix nicely with regular text, as long as the first element in a concatenation is not a binary. 0d is hex 13 - a CR, 0a is hex 10, a LF.
Thanks for all your help
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing