User:Sasdinosaur
From sasCommunity
< User:SasdinosaurSasdinosaur's Blog
Promoting QuotesI have posted the article Nesting Quotes in Strings, addressing one of the dilemmas when novice users begin programming in SAS. "Should I put literals in single quotes or double quotes?" Each form can be used to produce the correct result, such as nesting an apostrophe inside a SAS title statement. title 'Warren Repole''s Blog'; title "Warren Repole's Blog"; The first form is archaic, qualifying as a SAS Dinosaur technique at the T-Rex level. (See www.repole.com/dinosaur for an explanation of the dinosaur levels.) It was also a challenge to display the pair of quotes properly in a wiki page! I recommend using double quotes as your choice for string delimiters. Yes, there may be times when you must use surrounding single quotes, but the situations when double quotes are required are far more numerous -- just ask any SAS macro programmer! If SAS programmers were taught about double quotes right from their very first SAS program -- written by them, or written by you and viewed by them -- they would start out using the more robust choice. They'll still have to pair them properly, but that's another story...
|
