Pop Beer Needed 
Author Message
 Pop Beer Needed

Quote:
Tim Robinson writes:
>I have a web page that shows how to display the lyrics to 99 Bottles of Beer
>in different programming languages (full explanation of this silly thing found
>on the web page).  However, I lack a version in Pop.

Ok, here's a version using LIB * FORMAT_PRINT (Pop-11's implementation of the
Common Lisp function FORMAT):

 true -> pop_longstrings;

 define beer(n);
     until n == 0 do
         format_print(


              ~:*Take ~[~;it~:;one~] down, pass it around.~%',
             [^n]);
         n - 1 -> n;

     enduntil
 enddefine;

 beer(99);

The nice thing about this is that the numbers are printed as words, i.e.
"Ninety-nine bottles of beer".



Fri, 17 Apr 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Pop Beer Needed

2. Pop Beer Needed - Apology

3. Pop Beer Needed

4. 370 Assembler Beer Needed

5. Eiffel Beer Needed

6. Logo Beer Needed

7. Dylan Beer Needed

8. Dylan Beer Needed

9. Oberon Beer Needed

10. Computer Beer Needed!

11. VHDL Beer Needed

12. VHDL Beer Needed

 

 
Powered by phpBB® Forum Software