
-----------------------------------
vindicta
Thu May 01, 2008 9:37 am

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?

-----------------------------------
Expirant
Thu May 01, 2008 10:20 am

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:

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
