feat: add Stdin class with readLine and async stdin read support in io module
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import "io" for Stdin
|
||||
|
||||
System.write("> ")
|
||||
System.print("1 " + Stdin.readLine())
|
||||
System.write("> ")
|
||||
System.print("2 " + Stdin.readLine())
|
||||
|
||||
// stdin: first
|
||||
// stdin: second
|
||||
// expect: > 1 first
|
||||
// expect: > 2 second
|
||||
Reference in New Issue
Block a user