Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
String matching
Old
katrinehs
Junior Member
 
Status: Offline
Posts: 2
Join Date: Mar 2013
Default String matching - 03-20-2013, 11:54 AM

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
   
Reply With Quote
Matching a string
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Matching a string - 03-20-2013, 06: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
   
Reply With Quote
Old
katrinehs
Junior Member
 
Status: Offline
Posts: 2
Join Date: Mar 2013
Default 03-20-2013, 10:36 PM

That works. Thanks!
   
Reply With Quote
Reply

Tags
string, string functions

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.