Posted: Wed Mar 02, 2016 12:53 pm Post subject: "Navigation" table
Hello COMPSCI.CA
I am currently working on a project which includes 5 separate programs, ranging from receipt generators to table generation which outputs inputted information.
I want to 'combine' all the separate programs into one single turing file, and have a 'navigation' based command where when ran, the program will ask the user for a value, ranging from 1-5,
and when prompt, turing will run the program corresponding to the value inputted.
ex. "Please select a value from 1-5"
1 -> First Program
2 -> Second Program
3 -> Third Program
and so on and so forth.
I want it set up so that when a certain number is inputted, it will prompt the program to skip x amount of lines so that the program can begin on the line where 1 of the 5 programs will start.
Sponsor Sponsor
Dreadnought
Posted: Wed Mar 02, 2016 3:11 pm Post subject: Re: "Navigation" table
An if or case statement will allow you to control what happens based on your user's input.
Could you provide an example of how the 'if' or 'case' statement would be used?
I understand that it would have to be "if ___ = ___ then..." but no idea what would follow.
Thanks
Dreadnought
Posted: Thu Mar 03, 2016 10:46 pm Post subject: Re: "Navigation" table
VapeLord wrote:
Could you provide an example of how the 'if' or 'case' statement would be used?
I understand that it would have to be "if ___ = ___ then..." but no idea what would follow.