Permalink
Browse files

squaak: Add read() builtin

  • Loading branch information...
Benabik committed Dec 5, 2011
1 parent cf36033 commit e293df3879097942b97528569175f8cbbc289bfe
Showing with 9 additions and 0 deletions.
  1. +9 −0 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();
+}

0 comments on commit e293df3

Please sign in to comment.