I can't seem to do anything which allows a loop to keep asking for a word
until the user inputs the right word. I have tried many different things and
they all fail. Program included below.
REBOL [
Title: "Guessing the secret word"
Date: 11-Oct-99
Author: "T.M. Brannon"
Email: [EMAIL PROTECTED]
File: %guessing-word.r
Purpose: {
Play a guessing game
}
Category: [file script utility]
]
secret-word: "llama"
name: ask "What is your name? "
guess: ask "What is the secret word? "
either equal? name "Randal"
[ print "Hi Randal! How good of you to be here!" ]
[ print ["Hello" name "." ]]
while [not equal? guess secret-word]
[ print "Wrong loser. Try again."
unset 'guess
]
print "That's it!!!! You got it!!!"