Skip to content

Commit

Permalink
Implement prompt built-in.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Feb 13, 2009
1 parent 0f87695 commit 1ac6625
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/builtins/io.pir
Expand Up @@ -148,6 +148,19 @@ It is an error to use bare C<unlink> 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
Expand Down

0 comments on commit 1ac6625

Please sign in to comment.