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 C/C++ Preprocessor

(with Order interpreter)

Date:12/30/05
Author:Vesa Karvonen
URL:n/a
Comments:1
Info:http://cvs.sourceforge.net/viewcvs.py/chaos-pp/order-pp/example/bottles.c?view=markup
Score: (2.77 in 13 votes)
/*
 * (C) Copyright Vesa Karvonen 2004.
 */

#include "order/interpreter.h"

ORDER_PP
(8let((8B, 8fn(8N,
               8cond((8greater(8N, 1),
                      8separate(8N, 8quote(bottles)))
                     (8equal(8N, 1),
                      8quote(1 bottle))
                     (8else,
                      8quote(no more bottles))))),
      8for_each_in_range
      (8fn(8N,
           8print(8ap(8B, 8N) (of beer on the wall,) 8space
                  8ap(8B, 8N) (of beer,) 8space
                  (take one down, pass it around,) 8space
                  8ap(8B, 8dec(8N)) (of beer on the wall.))),
       100, 1)))

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
1Wim Rijnders04/20/057
Direct output (general / GNU)Gerry JJ12/30/052

Comments

>>  Falko said on 07/02/09 00:37:21

Falko Hi,

can anyone tell me where I can get the order interpreter code? I am very interested in it. I came across it somewhere once, but I can't find it anymore.

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: