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 MyPitSelf

Date:03/14/08
Author:Hugues de Fougieres
URL:http://www.mypitself.com
Comments:0
Info:http://www.mypitself.com
Score: (3.00 in 2 votes)
Tac(
 SetVar(ValueToLoop,Cst(99)), 
 LoopVar(ValueToLoop,ind,
  Do( 
   Tac( 
    SetVar(NumberOfBot,Cst(99)),
    SubVar(NumberOfBot,Var(ind)),
    Var(NumberOfBot)
    Test(
     Cond(Greater(2)),
     IfTrue(
      Tac(
       SetVar(Message1,
        Var(NumberOfBot),Cst(' bottles of beer on the wall, '),
        Var(NumberOfBot),Cst(' bottles of beer.'),br()
       ),
       SetVar(NewCount,Var(NumberOfBot)),
       SubVar(NewCount,Cst(1)),
       SetVar(Message2,Cst('Take one down and pass it around, ')
        Var(NewCount),Cst(' bottles of beer on the wall.'),br(),br(),
       ), 
      )
     ),
     IfFalse(
      Tac(
       Var(NumberOfBot)
       Test(
        Cond(Equal(2)),
        IfTrue(
         Tac(
          SetVar(Message1,
           Var(NumberOfBot),Cst(' bottles of beer on the wall, '),
           Var(NumberOfBot),Cst(' bottles of beer.'),br()
          ),
          SetVar(NewCount,Var(NumberOfBot)),
          SubVar(NewCount,Cst(1)),
          SetVar(Message2,Cst('Take one down and pass it around, ')
           Var(NewCount),Cst(' bottle of beer on the wall.'),br(),br(),
          ), 
 
         )
        ),
        IfFalse(
         Tac(
          Var(NumberOfBot)
          Test(
           Cond(Equal(1)),
           IfTrue(
            Tac(
             SetVar(Message1,
              Var(NumberOfBot),Cst(' bottle of beer on the wall, '),
              Var(NumberOfBot),Cst(' bottle of beer.'),br()
             ),
             SetVar(Message2,Cst('Take one down and pass it around, '),
              Cst('no more bottles of beer on the wall.'),br(),br(),
             ), 
            )
           ),
          ),
 
         )
        )
       ),
 
      )
     )
    ),
    Ech(Var(Message1)), 
    Ech(Var(Message2)), 
   )
  )
 ) 
 SetVar(Message1,Cst('No more bottles of beer on the wall, '),
  Cst('no more bottles of beer.'),br()
 ),
 SetVar(Message2,Cst('Go to the store and buy some more, '),
  Cst('99 bottles of beer on the wall.'),br(),br(),
 ), 
 Ech(Var(Message1)), 
 Ech(Var(Message2)), 

)

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Table view of MyPitSelf LanguageHugues de Fougieres03/31/080

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: