Skip to content

Commit

Permalink
moved 'prompt' into the setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Masak committed Jun 9, 2009
1 parent fa4198c commit b677d60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/builtins/io.pir
Expand Up @@ -155,25 +155,6 @@ 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"
$P1 = $P0.'get'()
unless $P1 goto undef
$S0 = $P1
.return ($S0)
undef:
.return ($P1)
.end


.sub '!qx'
.param string cmd
.local pmc pio
Expand Down
5 changes: 5 additions & 0 deletions src/setting/IO.pm
Expand Up @@ -68,4 +68,9 @@ multi sub lines(IO $filehandle,
$filehandle.lines();
}

multi sub prompt($msg) {
print $msg;
$*IN.get;
}

# vim: ft=perl6

0 comments on commit b677d60

Please sign in to comment.