open "output.txt" for output as #1 print #1, "This string is to be written to the file" close #1