Re: Another Error
- Posted by Matt Lewis <matthewwalkerlewis at gmail.com> Feb 01, 2007
- 680 views
c.k.lester wrote: > > c.k.lester wrote: > > You're trying to compare an atom (the 'y' and 'Y') and a sequence > > (Correct, which is "n"); that is a no-no in Euphoria. Use either: > > > > if find(Correct,"Yy") then > > Oops. That might require match() or something totally different. :) > Not necessarily:
if find( 'y', lower(Correct) ) then
A better way would be to not use prompt_string() for this, but get_key():
Correct = get_key() if find( Correct, "yY" ) then ... end if
Matt