Skip to content

Learn: Read

Julia Ogris edited this page Jun 20, 2023 · 1 revision

The read command

The read command reads a line of input from the user and returns it as a string. For example, the following code:

s := read
print s s

will read a line of input from the user and print it twice. If you type "hello" and press Enter, the code will print:

hello hello