Permalink
Browse files

Add some basic NQP examples

  • Loading branch information...
leto committed Nov 18, 2009
1 parent da7048b commit 2bd89cde579c9e539ade9044462aa031ddc2b7a5
Showing with 15 additions and 0 deletions.
  1. +3 −0 examples/hello_world.nqp
  2. +4 −0 examples/load_bytecode.nqp
  3. +8 −0 examples/loops.nqp
View
@@ -0,0 +1,3 @@
+#!nqp
+
+say("Hello, awesome Not Quite Perl 6 World!");
@@ -0,0 +1,4 @@
+#!nqp
+
+pir::load_bytecode('PGE.pbc');
+say("Loaded Parrot Grammar Engine");
View
@@ -0,0 +1,8 @@
+#! nqp
+# Example of a while loop
+
+my $i := 0;
+while( $i < 10 ) {
+ say("i=$i");
+ $i++;
+}

0 comments on commit 2bd89cd

Please sign in to comment.