Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Afnix

(Simple example)

Date:04/15/07
Author:Kahnamta
URL:n/a
Comments:1
Info:http://www.afnix.org/
Score: (2.71 in 7 votes)
# 99 Bottles of Beer in Afnix (www.afnix.org)
# by Kahnamta, Apr 15 2007

const verse (i) {
        if (> i 2) {
                println i " bottles of beer on the wall."
                println i " bottles of beer."
                println "Take one down, pass it around."

                trans j (- i 1)
                println j " bottles appear on the wall!"
                println

                return
        }

        if (== i 2) {
                println "Two bottles of beer on the wall."
                println "Two bottles of beer."
                println "Take one down, pass it around."
                println "One bottle appears on the wall."
                println

                return
        }

        if (== i 1) {
                println "One bottle of beer on the wall."
                println "One bottle of beer."
                println "Take it down, pass it around."
                println "No more bottles of appear on the wall!"

                return
        }
}

loop (trans i 99) (>= i 1) (i:--) (verse i)

Download Source | Write Comment

Alternative Versions

Comments

>>  brave said on 11/19/09 10:23:36

brave This is the first time I see this programming language, it seems a bit like LISP at first. I like it!

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: