Skip to content

@pmichaud /gist:3897389
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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
Something went wrong with that request. Please try again.