Language 4DOS Batch
| Date: | 04/20/05 |
| Author: | Rodney M. Savard |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
@ECHO OFF
:: BEER.BTM - 4DOS version 5.5 batch (btm) file
:: by Rodney M. Savard <rodney.savard%phun@phunnet.org>
SETLOCAL
SET plural=`s`
DO bottle = 99 TO 1 BY -1
ECHOS %bottle% bottle%plural% of beer on the wall,
ECHO %bottle% bottle%plural% of beer.
ECHOS Take one down, pass it around,
IFF (%@EVAL[%bottle% - 1]) == (0) THEN
ECHO no more bottles of beer on the wall.
ELSE
IF (%@EVAL[%bottle% - 1]) == (1) UNSET plural
ECHO %@EVAL[%bottle% - 1] bottle%plural% of beer on the wall.
ECHO.
ENDIFF
ENDDO
ENDLOCAL
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