Language MSH (Microsoft Command Shell)
| Date: | 01/30/06 |
| Author: | Danko Durbic |
| URL: | n/a |
| Comments: | 0 |
| Info: | http://channel9.msdn.com/wiki/default.aspx/Channel9.MSHWiki |
| Score: |
#
# 99 bottles of beer
# MSH (Microsoft Command Shell) (beta 3) version
#
# Author: Danko Durbic
# Date: 2006-01-30
function bottle( $num )
{
"$( ( $num, 'no more' )[ $num -eq 0 ] ) $( ( 'bottle', 'bottles' )[ $num -ne 1 ] )"
}
( 99..1 ) |
foreach { "$( bottle( $_ ) ) of beer on the wall, $( bottle( $_ ) ) of beer.`r`n" +
"Take one down and pass it around, $( bottle( $_ - 1 ) ) of beer on the wall.
" }
"No more bottles of beer on the wall, no more bottles of beer."
"Go to the store and buy some more, 99 bottles of beer on the wall."
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