Computer Science Canada If statements with more than one word |
Author: | aogborne [ Wed Mar 30, 2016 8:14 am ] | ||
Post subject: | If statements with more than one word | ||
What is it you are trying to achieve? i'm trying to make a text based game with using more than one word in a n IF statement if possible What is the problem you are having? it doesn't register anythign being entered Describe what you have tried to solve this problem googled, tutorials, if I change it to one word it works but not 2 Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1 |
Author: | Dreadnought [ Wed Mar 30, 2016 3:08 pm ] | ||||
Post subject: | Re: If statements with more than one word | ||||
Notice what happens if you type "go north" into the program below (and hit enter):
As you can see get stops at the first whitespace character (space, tab, newline, ...). You want get to read the entire line. To do this we add a colon and asterisk as so
For more details (like what happens if you use a number instead of an asterisk) see the documentation for get. |
Author: | aogborne [ Tue Apr 12, 2016 8:32 am ] |
Post subject: | RE:If statements with more than one word |
i forgot to thank you so here are some bits. +2 bits i don't have many but enjoy. tahnsk you dreadnought! |