
-----------------------------------
VapeLord
Wed Mar 02, 2016 12:53 pm

&quot;Navigation&quot; 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.

-----------------------------------
Dreadnought
Wed Mar 02, 2016 3:11 pm

Re: &quot;Navigation&quot; table
-----------------------------------
An [tdoc]if[/tdoc] or [tdoc]case[/tdoc] statement will allow you to control what happens based on your user's input.

You may also find the [tdoc]include[/tdoc] command useful

-----------------------------------
VapeLord
Wed Mar 02, 2016 8:51 pm

Re: &quot;Navigation&quot; table
-----------------------------------
An 

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
Thu Mar 03, 2016 10:46 pm

Re: &quot;Navigation&quot; table
-----------------------------------
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.


Here's a nice tutorial on if the user enters 1 then do what program 1 does (...) .
