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

Username:   Password: 
 RegisterRegister   
 Split tasks if possible?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vindicta




PostPosted: Thu May 01, 2008 9:37 am   Post subject: Split tasks if possible?

For the program I am making I would like to have a menu for the user to select a certain operation to be done. For example one option will collect data and save it and the other will find the data and analyze it. Should I just be using different procedures and fuctions? or can i run an entire different program with a certain code?
Sponsor
Sponsor
Sponsor
sponsor
Expirant




PostPosted: Thu May 01, 2008 10:20 am   Post subject: Re: Split tasks if possible?

Yeah just use different routines. There's no reason to open a whole other program.

Just do something like this:
code:

procedure CollectData
end CollectData

procedure AnalyzeData
end AnalyzeData

procedure Main
    var x : string
    loop
        put "1) Collect data"
        put "2) Analyze data"
        put "3) Quit"
        get x : *
        if x = "1" then
            CollectData
        elsif x = "2" then
            AnalyzeData
        elsif x = "3" then
            exit
        end if
    end loop
end Main

Main


Good luck,
Expirant
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: