September 26, 2022, 06:06:55 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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 ..