Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Output to text file
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Warchamp7




PostPosted: Fri Sep 21, 2007 11:06 am   Post subject: Output to text file

Is there any simple way to make a turing program output only particular blocks of text to the screen and a specifiable .txt file?

I just have a generator program that it asks for certain values, then generates multiple lines of text based on the values given.

Is there an easy way to make this happen without the use of the 'Run With Args' dialog??

Thanks,
Warchamp Cool
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Fri Sep 21, 2007 11:11 am   Post subject: RE:Output to text file

I'm not entirely sure what you mean. Have you tried reading a File I/O tutorial?
Warchamp7




PostPosted: Fri Sep 21, 2007 11:15 am   Post subject: RE:Output to text file

Okay, I have my program and it asks like 4-5 questions to the user for particular numbers

After all the data needed is input, it generates lines of code based on those numbers.

I'm looking for a way so that after the data is input, have it like pop up a dialogue asking for destination and file name etc. Then outputting the lines of code to said file
Dan




PostPosted: Fri Sep 21, 2007 11:45 am   Post subject: RE:Output to text file

The 'Run With Args' dialog is not ment to be used for noraml file i/o. This is a local seting and it will not change where the output goses on any once eltes computer who is runing your program.

You should be using the methods turing provieds for doing file I/O.

Here are some tutorals on it:

http://compsci.ca/v3/viewtopic.php?t=12972

http://compsci.ca/v3/viewtopic.php?t=5

http://compsci.ca/v3/viewtopic.php?t=6818



P.S. To open a new window or use dialogs you will need to look in to the window comand and/or the GUI modual. This is not realy needed for what you whont to do tho.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Warchamp7




PostPosted: Fri Sep 21, 2007 12:00 pm   Post subject: RE:Output to text file

First link gave me what I needed. Thank you
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: