| parrotcode: Parrot Examples | ||
|
Before you can run any examples, you'll need to download the latest version of Parrot. If you don't have a compiler, some binary packages are available. Once you have a parrot executable, check out the various types of examples on the left. Also, be sure to check out the examples directory in the parrot repository. Example ConventionsAs you read through the examples, you'll see the following typographic conventions: Code snippets will appear in blue: 10 PRINT "HELLO" Expected output will appear in green: HELLO Occasionally, additional information will be presented in red: take note! Help! I'm stuck inside a fortune cookie factory! Running ExamplesFor all of the examples, you can save the code in a file (PIR examples use a .pir suffix, PASM examples use a .pasm suffix.). Then you can either run the sample directly:parrot foo.pirOr, you can compile to bytecode and then run it: parrot -o foo.pbc foo.pir parrot foo.pbc |
||
|
Site Information and Contacts |
||
|
one bytecode to rule them all
|
|