March 28, 2024, 10:55:24 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


A simple console test ..

Started by GWS, November 26, 2006, 02:04:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

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
Tomorrow may be too late ..

Jerry Muelver


GWS

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
Tomorrow may be too late ..