Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

squaak: Add read() builtin

  • Loading branch information...
commit e293df3879097942b97528569175f8cbbc289bfe 1 parent cf36033
@Benabik Benabik authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 examples/languages/squaak/src/Squaak/Runtime.pm
View
9 examples/languages/squaak/src/Squaak/Runtime.pm
@@ -19,3 +19,12 @@ sub print(*@args) {
pir::say(pir::join('', @args));
pir::return();
}
+
+our $STDIN;
+INIT {
+ $STDIN := pir::getinterp().stdin_handle();
+}
+
+sub read() {
+ +$STDIN.readline();
+}
Please sign in to comment.
Something went wrong with that request. Please try again.