>HI all,
>
>How Can I write in a *.txt file
Interestingly, I never tried to put together a list of all the ways you can do that in Fox... so let's try to do this now:
1) use low-level file functions (fOpen(), fCreate(), fWrite() etc)... though, with these you can write binaries as well, if you really want.
2) Set Alternate. This will also put an EOF character (i.e. chr(26)) at the end when you close it, and some software that may use the resulting file may not recognize it. Also, you may continue adding more text after that character, but then some other software may acknowledge the EOF marker and refuse to read anything beyond it.
3) Set Text to (file), then use \ and \\ to output text to it
4) text to (file) [additive] ... Endtext
5) compose any text into a string and StrToFile() it
6) have the text in a memo field and Copy Memo ... To (cFile)
7) Type (cTextfile) to file (cTextFile2)... basically copies the file, but with some formatting (see Set Heading)
8) copy/export table or cursor to a file, type SDF or Delimited
9) report form ... to (cfile) type ASCII. Hard to control, format nearly unpredictable
10) set printer to (cFile), set print on, issue a series of ?, ?? statements
11) set printer to (cFile), set device to printer, issue a series of @ ...say statements.
12) use automation and create a document in Word (or other automatable application), save as text.
As you see, your choices are somewhat limited :).