public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
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$

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.