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

Username:   Password: 
 RegisterRegister   
 How to link turing programs?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rikku007




PostPosted: Mon May 14, 2007 9:33 am   Post subject: How to link turing programs?

I have a program that consists of a menu and different pages, I was wondering if there is any way to link the pages to the menu so that when the user clicks the button in the menu screen, the program automatically goes to that corresponding screen. If anybody knows the code, it is appreciated if you can show us.
Thanks.
Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Mon May 14, 2007 9:41 am   Post subject: RE:How to link turing programs?

The best way to do what you want to do is use a procedure for each page that you have (preferrably with a main generic procedure to control each page) and use mutual recursion to go back and forth from procedure to procedure. These topics (should) both be covered in the Procedures and Functions tutorial in the Turing Walkthrough.
rollerdude




PostPosted: Mon May 14, 2007 10:09 am   Post subject: Re: How to link turing programs?

i had thought you meant linking programs, as in have a separate program for each page?

if so, you'd need somthing like

code:

import page1.t,page2.t %ect
                                  %or include, i'm not entirely sure which to use

in which case, each page has to be a unit

im sorry if this is not what you had in mind, but this what i thot you meant by your title
Clayton




PostPosted: Mon May 14, 2007 10:26 am   Post subject: RE:How to link turing programs?

*sigh*

import is used to allow access to Turing Unit Files for use by programmers. This is usually used for importing classes and modules into the program.

include takes a .t source file, and basically copies and pastes the code from that file into your program (in essence). They are two completely different things.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: