Language S_Tran
(Uses simple recursion for option repeats)
Date: | 10/12/08 |
Author: | R. Stellingwerf |
URL: | http://www.stellingwerf.com |
Comments: | 0 |
Info: | http://www.stellingwerf.com/rfs-bin/index.cgi?action=PageView&id=5 |
Score: | (2.67 in 3 votes) |
#---S_Tran Version of 99 Bottles of beer--- # to get the recursive feature, store in the file "beer.s" # and open .s files with the s_tran.exe interpreter for_i = 99 2 -1 show_line @i " Bottles of beer on the wall, " @i " bottles of beer" show_line "Take one down and pass it around" if i=2 break show_line " " @(i-1) " bottles of beer on the wall" end_i show_line " 1 bottle of beer on the wall" show_line "1 Bottle of beer on the wall, 1 bottle of beer" show_line "Take it down and pass it around" show_line "No bottles of beer on the wall." query "" // pause for cr show_line "Go to the store and buy some more" show_line " 99 bottles of beer on the wall!" query "" // pause for cr system beer.s // do it again....
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