10.12.2 표준 IO 스트림(Standard IO Streams)
10.12.2 표준 IO 스트림(Standard IO Streams)
Sys 모듈을 사용해 stdin, stdout, stderr의 세 표준 스트림에 접근할 수 있습니다.
// trace를 사용하지 않고 출력, 새 줄 문자 없이 출력할 때 유용
Sys.stdout().writeString('Please type your name: ');
// 터미널로 문자 플러시
Sys.stdout().flush();
// 터미널을 통해 사용자 입력 읽기
final input = Sys.stdin().readLine();
trace('Hello ${input}}!');