diff --git a/src/builtins/io.pir b/src/builtins/io.pir index 639664f91de..87c957ba04e 100644 --- a/src/builtins/io.pir +++ b/src/builtins/io.pir @@ -148,6 +148,19 @@ It is an error to use bare C without arguments. .end +=item prompt + +Shows the supplied message and then waits for input from $*IN. + +=cut + +.sub 'prompt' + .param string prompt + 'print'(prompt) + $P0 = get_hll_global "$IN" + .tailcall $P0.'readline'() +.end + =back =cut