Desktop productivity for business analysts and programmers

Slightly OT Question for Chris

Reply
Contributor
Posts: 53

Slightly OT Question for Chris

Chris, I just read your blog entry on nerds and you mentioned that a hypothetical holiday greeting card might say %let peace='on Earth';
Of course, I can't help asking, why the quotes?
Trusted Advisor
Posts: 2,114

Re: Slightly OT Question for Chris

A nerd's holiday card must be syntactically correct. In SAS, text constants are enclosed in quotes.....
Super User
Posts: 5,385

Re: Slightly OT Question for Chris

Syntactically, text constants assigned to a macro variable doesn't have to be enclosed in quotes. It's more a question of how you will use the macro variable later on...

/Linus
Data never sleeps
Community Manager
Posts: 2,889

Re: Slightly OT Question for Chris

Actually, Cynthia Z suggested a true geek might write:

[pre]
options symbolgen;
%let what = peace;
%let where = &&&what;
%let how = And let it begin with me.;

%put Let there be &what &where.. &how;
[/pre]
SAS Super FREQ
Posts: 8,819

Re: Slightly OT Question for Chris

Of, course, the code assumes that
[pre]
%let peace = on Earth;
[/pre]

has already been entered into the Global System Table with a %LET statement.

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 113 views
  • 0 likes
  • 5 in conversation