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

Username:   Password: 
 RegisterRegister   
 How to run multiple modules at the same time
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jackfarley1025




PostPosted: Fri Oct 28, 2016 8:35 pm   Post subject: How to run multiple modules at the same time

What is it you are trying to achieve?
<Replace all the <> with your answers/code and remove the <>>


What is the problem you are having?
<When I use modules it executes each one separately>


Describe what you have tried to solve this problem
<I don't know how to execute two modules at the same time>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<>

Turing:


<Add your code here>



Please specify what version of Turing you are using
<4.1.1>
Sponsor
Sponsor
Sponsor
sponsor
NightOwl




PostPosted: Tue Nov 29, 2016 8:28 pm   Post subject: Re: How to run multiple modules at the same time

I don't understand your question completely, as you did not provide details, but I'll try to explain.

A module is the code you put in another file (most of the time) in order to shorten the main program up and make everything look cleaner. You can have variables, procedures, functions, etc. in a module. While it is possible, it's not really a good coding practice to execute the module directly when importing it. Instead, define some procedures in the module and call it from your main program. This way makes your code a lot more readable and maintainable. I don't know what you are attempting to do, but there are probably better ways to do it without "execute two modules at the same time".

If you are asking how to run two tasks at the same time, you can look up processes. However, this method is not very reliable either, so I think you might be better off just rethinking how you design your program.
Insectoid




PostPosted: Wed Nov 30, 2016 8:14 am   Post subject: RE:How to run multiple modules at the same time

You cannot run code simultaneously in Turing, and attempting to will cause you far more problems than you think it will solve. Do you really need your modules to execute simultaneously, or can you re-write them so they can execute in sequence?
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  [ 3 Posts ]
Jump to:   


Style:  
Search: