Page 1 of 1

how do u make user input non-case specific?(newbie

Posted: Fri Oct 17, 2003 3:25 am
by Guest
>>>stupid newbie<<< :-[ :-[
does any1 know how you can make a user's input non-case specific?
for example if the program only accepts "green" how can i make it to be able to recognize "GrEen"?

Re: how do u make user input non-case specific?(ne

Posted: Fri Oct 17, 2003 4:36 am
by Guest
Lets try this:

. . .
. . .
INPUT "Enter the code";code$
control$ = LCASE$(code$) &nbsp;'change all letters to lower case
IF control$ = "green" THEN
PRINT "ok"
ELSE
PRINT "Try again"
END IF
. . .
. . .

With UCASE$ you change all letters to upper case.