Re: Euphoria ASCII function revisited
- Posted by Steve Elder <SteveElde at AOL.COM> Jul 27, 1997
- 995 views
-- You can include wildcard.e, and convert the inputs to lower case, -- Which will shorten the elsif section. This code will loop until -- you press q to quit. include wildcard.e integer key while 1 do key = 0 while find(key, "YyNnQq") = 0 do -- loop until Y, y, N, n, Q, or q is pressed key = get_key() key = lower(key) -- converts to lower case end while if key = 'y' then -- y was pressed puts(1, "y was pressed\n") elsif key = 'n' then puts(1, "n was pressed\n") elsif key = 'q' then puts(1, "\nThank you for using this program.") exit end if end while --Steve Elder