Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Program-termination/Wren/program-termination.wren
Normal file
10
Task/Program-termination/Wren/program-termination.wren
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "io" for Stdin, Stdout
|
||||
|
||||
System.write("Do you want to terminate the program y/n ? ")
|
||||
Stdout.flush()
|
||||
var yn = Stdin.readLine()
|
||||
if (yn == "y" || yn == "Y") {
|
||||
System.print("OK, shutting down")
|
||||
Fiber.suspend() // return to OS
|
||||
}
|
||||
System.print("OK, carrying on")
|
||||
Loading…
Add table
Add a link
Reference in a new issue