Computer Science Canada how to create txt file |
Author: | lufthansa747 [ Wed Dec 23, 2009 8:40 pm ] |
Post subject: | how to create txt file |
What is it you are trying to achieve? is it possible to create a txt file in side with turing because i am trying to make a game where the player can make a custom map and call it what ever they want. if so how Please specify what version of Turing you are using 4.1.1 |
Author: | TheGuardian001 [ Wed Dec 23, 2009 9:33 pm ] |
Post subject: | Re: how to create txt file |
I believe that opening a file for writing will create the file if it doesn't exist. So just open it like you would any other text file with the open : fNum, fName, fMode command. |
Author: | DtY [ Wed Dec 23, 2009 10:03 pm ] |
Post subject: | Re: how to create txt file |
TheGuardian001 @ Wed Dec 23, 2009 9:33 pm wrote: I believe that opening a file for writing will create the file if it doesn't exist.
Yup, if you open in write mode, the file will automatically be created, if it doesn't exist.
So just open it like you would any other text file with the open : fNum, fName, fMode command. Check out the tutorial: http://compsci.ca/v3/viewtopic.php?t=12972 |