|
From: Hridesh R. <hr...@us...> - 2014-07-14 22:56:20
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The Panini language compiler".
The branch, master has been updated
Summary of changes:
.../Bottles99.java | 79 ++++++++-----------
1 files changed, 33 insertions(+), 46 deletions(-)
copy test/tools/panc/typecheck/IncorrectWiring1.java => examples/Bottles99.java (50%)
via 6e52cc2466911cf0ef55b996ac3df6a0c3044aa2 (commit)
from 9b10c1fabc4323b960afa7b09c99a230656ac931 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6e52cc2466911cf0ef55b996ac3df6a0c3044aa2
Author: Dr. Hridesh Rajan <hr...@cs...>
Date: Mon Jul 14 17:56:10 2014 -0500
A simple implementation of the 99 bottles song.
http://99-bottles-of-beer.net
diff --git a/examples/Bottles99.java b/examples/Bottles99.java
new file mode 100644
index 0000000..f58d596
--- /dev/null
+++ b/examples/Bottles99.java
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the Panini project at Iowa State University.
+ *
+ * The contents of this file are subject to the Mozilla Public License
+ * Version 1.1 (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/.
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * For more details and the latest version of this code please see
+ * http://paninij.org
+ *
+ * Contributor(s): http://99-bottles-of-beer.net
+ */
+
+capsule Bottles99 {
+ void run() {
+ for(int i=99; i>0; i--)
+ System.out.println(nonZero(i));
+ System.out.println("1 bottle of beer on the wall, 1 bottle of beer.\n" +
+ "Take one down and pass it around, no more bottles of beer on the wall.\n" +
+ "No more bottles of beer on the wall, no more bottles of beer.\n" +
+ "Go to the store and buy some more, 99 bottles of beer on the wall.");
+ }
+ private String nonZero(int num){
+ return num + " bottles of beer on the wall, "+ num + " bottles of beer.\n" +
+ "Take one down and pass it around, " + (num-1)+" bottles of beer on the wall.\n";
+ }
+}
\ No newline at end of file
-----------------------------------------------------------------------
hooks/post-receive
--
The Panini language compiler
|