Re: Another Error

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu