资源描述:
《Secrets of Macro Quoting Functions – How and Why》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、SecretsofMacroQuotingFunctions–HowandWhySusanO'Connor,SASInstituteInc.,Cary,NCABSTRACTcharacterstoillustratethepositionofamacrodeltacharacterinmacroquoting.How,why,whenandwheretousemacroIwanttobrieflydefinethetermcompilerandquotingfunctionsaretrickyque
2、stionsforallrelateittotheSASSystemandtotheSASusers.Macroquotingisnot,assomethink,macrofacilityparticularly.puttingsingleanddoublequotationmarksinoraroundSAStokens.MacroquotingisactuallyAclassicdefinitionofacompilerisaprogrammaskingspecialcharactersandm
3、nemonicthatdecodesinstructionswritteninpseudocodeexpressionsintheSAS®Systemsothattheseandproducesamachinelanguageprogramtobecharactersarenotconfusedorambiguousintheirexecutedatalatertime.Acompilerisaprogramcontextduringtokenizationandexecutionofthattra
4、nslatesinstructionswritteninahighlevelSASorSASmacro.SASmacroquotingprogramminglanguageintoalower-levelfunctionsalsoareusedtomarkstartingandlanguageorsetofinstructionsthatcanbeendingdelimiters.executed.Thetermscompile-timeandrun-timeshouldbeThereareseve
5、ralpartsoftheSASSystemthatunderstoodasrelatedtomacroformasteryofcanbereferredtoasacompiler:SCL,theDATAmacroquotingfunctions.Thedifferencesandstep,somePROCsandmacro.Sometimes,thetimingofthecompile-timemacroquotingtermcompilerisusedinacavaliermannerand,f
6、unctions,%STRand%NRSTR,willbeinonesentence,“compiler”canmeanDATAemphasized.Themeaningofrun-timemacrostepcompilerormacrocompiler.ThisconfusionquotingfunctionsandtheindividualimplicationsisfoundinSASdocumentationandinSASinyourcodewillbecoveredandthediffe
7、rencescourses.Whiletherearemanycompilersinthebetweenrun-timeandcompile-timemacroSASSystem,theyarealldifferent.TheSASquotingfunctionswillbeillustrated.macrocompilerwillbethefocusofthispaperbecauseitisintheSASmacrofacilitythatmacroDetailsandhistoryof%QUO
8、TEandquotingoccurs.Forthepurposeofillustration,I%BQUOTEmayhelpusersrememberthewillcreateasimplemacropseudocodetodifferencesinwhatismaskedineachfunction.suggestcompiledmacroinstructionsandAlso,theimplementationofmacroquotingconstanttext.