Voting

Category

real language

Bookmarking

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

Support Us

Language Panorama Pantalk

(Uses words instead of numbers)

Date:10/23/07
Author:David Thompson
URL:n/a
Comments:1
Info:http://www.provue.com/FAQ/PanoramaFAQ.html#CompareProgramming
Score: (3.08 in 12 votes)
// PanTalk version of 99 Bottles of Beer
// PanTalk is the scripting language of Panorama
// This procedure requires Panorama 3.0 or later

Local OnePhrase
FileGlobal Lyrics

OnePhrase = "of beer on the wall, xx of beer."+¶
    +"Take one down and pass it around, yy of beer on the wall."

ArrayFilter rep(¶,99),Lyrics,¶,pattern(100-seq(),"§ bottle~ ")+
    replace(replace(OnePhrase,"xx",lower(pattern(100-seq(),"§ bottle~"))),
    "yy",lower(pattern(100-seq()-1,"§ bottle~")))+¶

/* Delete "negative one bottle" line, and substitute "Go to the store" etc. */

Lyrics = strip(Lyrics)[1,"-"+¶]
    +"Go to the store and buy some more, ninety nine bottles of beer on the wall."

ShowVariables Lyrics
FileSave folder(""),"Ninety_Nine_Bottles.txt","",Lyrics

Download Source | Write Comment

Alternative Versions

Comments

>>  J Cook said on 10/24/07 18:26:50

J Cook Nice and neat. Well done.

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: