POSITION:028,114
COLOUR:STANDARD
TEXT:00,It is sometimes necessary to read in an entire character string instead
TEXT:16,of a single character. Euphoria has a library routine that performs this:
COLOUR:EUPHORIA
TEXT:32,   = gets(0)
COLOUR:POINTS
TEXT:00,ro
COLOUR:STANDARD
TEXT:32,Like wait_key(), gets() pauses the program run for keyboard data. Unlike
TEXT:16,wait_key(), it is not a single value but a string of data that is stored
TEXT:16,in a variable at the left of the equal sign. However, notice that the
TEXT:16,receiving variable is an object type variable. This is necessary because
TEXT:16,a value of -1 (meaning that no keyboard data string was retrieved) may
TEXT:16,also be returned. It's also important to note that the Enter key that you
TEXT:16,pressed to end the string to send to gets() is a part of the string, at
TEXT:16,the very end as value 10. The receiving object variable will contain a 
TEXT:16,sequence composed of atoms that represent ASCII codes. This means puts()
TEXT:16,and printf() can be used to display the data received by gets(). A demo
TEXT:16,program is available to show one use of gets() from this screen.
