Language OpenVMS DECTPU
Date: | 04/20/05 |
Author: | Anonymous |
URL: | n/a |
Comments: | 0 |
Info: | n/a |
Score: | ![]() |
! Under OpenVMS ! TPU command file. ! Usage: $ EDIT/TPU/NOSECTIO/COMMAND=BEER.TPU ! PROCEDURE count_down( bottle_count ) LOCAL new_count MESSAGE( FAO("!ZL bottle!%S of beer on the wall",bottle_count) ) ; MESSAGE( FAO("!ZL bottle!%S of beer",bottle_count) ) ; MESSAGE( "Take one down, pass it around" ) ; new_count := bottle_count - 1 ; IF (new_count > 0) THEN MESSAGE( FAO("!ZL bottle!%S of beer on the wall",new_count) ) ; MESSAGE( "" ) ; count_down( new_count ) ; ELSE ! End recursion MESSAGE( "Go to the store for some more" ) ; ENDIF; ENDPROCEDURE; ! This is the program: count_down( 99 ) ; MESSAGE("------------------"); MESSAGE(" "); EXIT ; !
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