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(
··@(~R~) bottle~:P of beer on the wall.~%~
····@(~R~) bottle~:P of beer!~%~
~:*Take ~[~;it~:;one~] down, pass it around.~%',
[^n]);
n - 1 -> n;
format_print('~[·········@(~R~)~] more bottle~:P of beer on the wall.~2%', [^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".