I am looking for the most natural way to save data to a text file. Could someone provide a simple example? Is there a function from the println family that does the job?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
fprintf(andfprintfn) function works likeprintfandsprintfbut takes aTextWriterto write to. You can found out more here.Note the whole Core.Printf module is interesting.
A very simple example: