Skip to content

Instantly share code, notes, and snippets.

@nattybear
Last active January 19, 2021 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nattybear/29c512810885671e1283161a31d935b7 to your computer and use it in GitHub Desktop.
Save nattybear/29c512810885671e1283161a31d935b7 to your computer and use it in GitHub Desktop.

이 글은 Canol Gokel님이 만든 Computer Programming using GNU Smalltalk를 읽고 정리한 것이다.

Getting User Input

"user_input.st"
"A program to demonstrate how to demonstrate how to get input from user."

| userName |

Transcript show: 'What is your name? '.
userName := stdin nextLine.

Transcript show: ('Hello ', userName, '!'); cr.

:= 연산자는 우선 순위가 가장 낮기 때문에 stdin nextLine이 먼저 실행되고 그 결과가 나중에 변수에 할당 된다.

Computer Programming with GNU Smalltalk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment