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 SAS Macro Language

(SAS 8.2 Macro Language)

Date:04/16/09
Author:Mauro Rospocher
URL:n/a
Comments:2
Info:http://v8doc.sas.com/sashtml/macro/index.htm
Score: (3.13 in 47 votes)
/* SAS Macro Language 8.2       */
/* Recursive SAS Macro solution */ 

%macro bottiglieSong(bottiglie);
 %local resto;
 %let resto=%eval(&bottiglie-1);
 %put &bottiglie bottles of beer on the wall, &bottiglie bottles of beer.;
 %put Take one down and pass it around, &resto bottles of beer on the wall.;
 %put ;
 %if &bottiglie > 2 %then %bottiglieSong(&resto);
 %else %do;
   %put 1 bottle of beer on the wall, 1 bottle of beer.;
   %put Take one down and pass it around, no more bottles of beer on the wall.;
   %put ;
   %put No more bottles of beer on the wall, no more bottles of beer.;
   %put Go to the store and buy some more, 99 bottles of beer on the wall.;
 %end;
%mend bottiglieSong;

/* the macro call */

%bottiglieSong(99)

Download Source | Write Comment

Alternative Versions

Comments

>>  MARCELLA28Lawrence said on 08/14/10 13:28:56

MARCELLA28Lawrence That is understandable that money can make people autonomous. But what to do when somebody does not have money? The one way is to try to get the <a href="http://bestfinance-blog.com/topics/home-loans">home loans</a> and just short term loan.

>>  Konsolen said on 09/01/10 06:05:36

Konsolen Vielen Dank! Super Artikel! Wenn Sie Elektronik möchten,Können Sie im unser efox-shop suchen.wir bieten Navigation ,GPS Gerät ,DVD Spieler ,Auto Werkzeuge ,Auto Schmuck ,Kfz Zubehör AND China GPS , Navigation Gerät AND Auto DVD Spieler kaufen , Auto GPS Gerät kaufen AND Auto Rückfahrsystem Konsolen usw.
welcome you to : http://www.efox-shop.com/pc-videospiele-china-spiel-konsole-c-236_395.html Die besten Dual SIM Handys, <a href=" www.efox-shop.com/pc-videospiele-china-spiel-konsole-c-236_395.html "> Konsolen </a.>,

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: