PDA

View Full Version : String matching


katrinehs
03-20-2013, 12:54 PM
Does anybody know if it is possible to do string matching in Alice 2.2?
Were making the user enter a string, followed by an if statement where we are trying to match the string.
For example, if the user enters 'dog', the program will continue with one method; for all other entries, the program continues with a different method.

Hope someone can help :)

chickentree
03-20-2013, 07:35 PM
Yes,
Make an If statement, and drag your string variable into it, Alice will prompt you to choose either == or != and then ask for a string to match.
Mark

katrinehs
03-20-2013, 11:36 PM
That works. Thanks!