Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language DCL

(for OpenVMS)

Date:04/20/05
Author:Rik Steenwinkel
URL:n/a
Comments:0
Info:n/a
Score: (3.00 in 12 votes)
$! 99 bottles of beer
$! Written for VMS DCL by rsteenw@xs4all.nl
$!
$! $fao is a system lexical function, where FAO stands for 
$! Formatted ASCII Output. There's a fair bunch of these 
$! functions accessible via DCL (the command interpreter), 
$! like querying system, device, process and user parameters, 
$! string and list manipulation, file system foo, and more.
$!
$ cnt = 99
$ msg = f$fao("!UB bottle!1%C!%Es!%F of beer", cnt)
$ loop:
$ write sys$output f$fao("!AS on the wall!/!-!AS", msg)
$ write sys$output "Take one down and pass it around"
$ cnt = cnt - 1
$ if cnt .gt. 0
$ then
$   msg = f$fao("!UB bottle!1%C!%Es!%F of beer", cnt)
$   write sys$output f$fao("!AS on the wall!/", msg)
$   wait 00:00:02
$   goto loop
$ else
$   write sys$output "No more bottles of beer on the wall"
$ endif

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Digital Command Language OpenVMS V7.3-1Javascribe08/18/082
on VAXAnonymous04/20/051
for VMSAnonymous04/20/050

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: