Language VGL
(SampleManager post 3.2 version)
| Date: | 03/31/06 |
| Author: | Joel Limardo |
| URL: | http://www.limsexpert.com |
| Comments: | 1 |
| Info: | http://www.thermo.com/com/cda/product/detail/1,,10379,00.html |
| Score: |
ROUTINE drink (VALUE n)
DECLARE drunkMsg
drunkMsg = STRIP(STRING(n)) : " bottles of beer"
IF (n = 0) THEN
drunkMsg = "No more bottles"
ELSEIF (n = 1) THEN
drunkMsg = drunkMsg # "s"
ENDIF
RETURN(drunkMsg)
ENDROUTINE
DECLARE indx, stockMsg, outMsg
stockMsg = "Take one down, pass it around,"
indx = 99
outMsg = ""
WHILE (indx > 0) DO
outMsg = drink(indx)
LITERAL
$outMsg___________ on the wall, $outMsg_______________!
Take one down, pass it around,
$ENDLITERAL
outMsg = drink(indx - 1)
LITERAL
$outMsg____________ on the wall!
$ENDLITERAL
indx = indx - 1
ENDWHILE
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| This is an update to a previous post | Joel Limardo | 07/03/08 | 0 | |
| 2 | Anonymous | 04/20/05 | 0 |
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