fork download
  1. "Declare a variable"
  2. | userName |
  3.  
  4. "Prompt the user"
  5. 'What is your name?' displayNl.
  6.  
  7. "Read user input from stdin"
  8. userName := FileStream stdin nextLine.
  9.  
  10. "Print the greeting"
  11. ('Hello, ', userName) displayNl.
  12.  
Success #stdin #stdout 0.01s 7808KB
stdin
Standard input is empty
stdout
What is your name?
Hello,