LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Jan 2006 07:31:14 -0800
Reply-To:     Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Eric Hoogenboom <erichoogenboom@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Re: semicolon behind macro calls
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

Rune,

Sometimes you build macros that generate parts of statements. In that case, the semicolon may corrupt the code. See example below.

I prefer using the semicolon too, since it enables me to "turn it off " by placing a * before the macro call.

%macro valdef (value, descr); &value = "&descr" %mend valdef;

proc format; value zip %valdef(1000, Amsterdam) %valdef(2000, Rotterdam) %valdef(3000, Utrecht) ; run;

/* You want errors? Here they are! */

proc format; value zip %valdef(1000, Amsterdam); %valdef(2000, Rotterdam); %valdef(3000, Utrecht); ; run;

Hth, Eric


Back to: Top of message | Previous page | Main SAS-L page