Creating a .txt file within turing
Author |
Message |
dymd3z
|
Posted: Mon May 28, 2007 7:55 am Post subject: Creating a .txt file within turing |
|
|
How do I do this, and assign contents of an array to it. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Albrecd
|
Posted: Mon May 28, 2007 3:42 pm Post subject: Re: Creating a .txt file within turing |
|
|
You should start by reading Clayton's tutorial on File I/O and if you still have questions, feel free to ask. |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Mon May 28, 2007 4:25 pm Post subject: RE:Creating a .txt file within turing |
|
|
A quick and dirty example. You'd still do well to read that tutorial though.
Turing: |
var stream : int
open : stream, "test.txt", put %or write if you like
put : stream, "Look what I did!"
close : stream
|
|
|
|
|
|
![](images/spacer.gif) |
Shades
|
Posted: Wed Jun 06, 2007 7:28 pm Post subject: RE:Creating a .txt file within turing |
|
|
If turing is running a file input statement and the .txt doesn't exist, turing will just create it in the same location as the .t file |
|
|
|
|
![](images/spacer.gif) |
|
|