Just a quick test for a console program:
openconsole
stringÂÃ, s
DO
color 7,0
input "Enter a color (red, green, or blue) ... ", s
SELECT true
case (s = "red")
color 12,0
print "You entered Red"
case (s = "green")
color 10,0
print "You entered Green"
case (s = "blue") | (s = "BLUE")
color 9,0
print "You entered Blue"
case (s <> "red") & (s <> "green") & (s <> "blue") & (s <> "")
color 14,0
print "Invalid entry."
ENDSELECT
UNTIL (s = "")
do:until inkey$<>""
closeconsole
end
Works like a charm .. :)
Graham
Graham, would it be okay to add this to the wiki, say like http://ebasic.wikispaces.com/GWS+simple+console+test ?
I should think so Jerry .. I found it among my many snippets dating way back .. so I can't remember if I composed it or where it originated..
I don't think anyone would mind though .. :)
Graham