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

Username:   Password: 
 RegisterRegister   
 Splitting up the files for a Project
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
astgenator




PostPosted: Sun Sep 06, 2009 3:32 pm   Post subject: Splitting up the files for a Project

is there any way(for organization purposes) to use more than one turing file for a program? Lets say for a game, all of your battle scripts go in one file, all of your chat scripts go in another and so on. Basically is it possible to use code from another file?

Any help is appreciated.
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Sun Sep 06, 2009 7:01 pm   Post subject: RE:Splitting up the files for a Project

Yes, generally this is done by creating a module or class and importing that file using import. There should be a few tutorials on this (for example this one), or you can look up the import keyword in Turing's built-in help.

Alternatively, you can basically 'copy-paste' the code from the other file using the include keyword, as described here.
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  [ 2 Posts ]
Jump to:   


Style:  
Search: