Language GBD
Date: | 04/20/05 |
Author: | Laurent Vogel |
URL: | http://lvogel.free.fr/ |
Comments: | 0 |
Info: | n/a |
Score: | (2.50 in 10 votes) |
# GBD command version of 99 bottles of beer # Laurent Vogel, http://lvogel.free.fr # # run as: gdb --batch -nw --command=THIS_FILE printf "99 bottles of beer on the wall,\n" printf "99 bottles of beer.\n" set $i = 99 define loop set $i = $i-1 printf "Take one down, pass it around,\n" printf "%d bottles of beer on the wall.\n\n", $i printf "%d bottles of beer on the wall,\n", $i printf "%d bottles of beer.\n", $i end define loop2 loop loop loop loop end define loop3 loop2 loop2 loop2 loop2 end loop3 loop3 loop3 loop3 loop3 loop3 loop printf "Take one down, pass it around,\n" printf "1 bottle of beer on the wall.\n\n" printf "1 bottle of beer on the wall,\n" printf "1 bottle of beer.\n" printf "Take one down, pass it around,\n" printf "No bottle of beer on the wall.\n"
Download Source | Write Comment
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!
Comments