Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created October 16, 2012 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmichaud/3897389 to your computer and use it in GitHub Desktop.
Save pmichaud/3897389 to your computer and use it in GitHub Desktop.
pmichaud@kiwi:~/p6/parrot$ git describe --tags
RELEASE_4_8_0-133-g1101abb
pmichaud@kiwi:~/p6/parrot$ cat z.pir
.sub 'main' :main
.local pmc stdin
stdin = getstdin
stdin.'encoding'('utf8')
sweep 1
$I0 = 1000
loop:
unless $I0 > 0 goto done
$S0 = $I0
dec $I0
goto loop
done:
print "Enter a line of text: "
$S1 = stdin.'readline'()
print "Your line is: "
say $S1
.end
pmichaud@kiwi:~/p6/parrot$ ./parrot z.pir
Enter a line of text: hello
world
I already entered a line of text
Your line is: hello
world
I already entered a line of text
pmichaud@kiwi:~/p6/parrot$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment