Chapter 7
Macro Quoting
Macro Quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Masking Special Characters and Mnemonics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Understanding Why Macro Quoting Is Necessary . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Overview of Macro Quoting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Passing Parameters That Contain Special Characters and Mnemonics . . . . . . . . . . 84
Deciding When to Use a Macro Quoting Function and Which Function to Use . . 85
%STR and %NRSTR Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Using %STR and %NRSTR Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Using Unmatched Quotation Marks and Parentheses with %STR and %NRSTR . . 88
Using % Signs with %STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
Examples Using %STR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Examples Using %NRSTR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
%BQUOTE and %NRBQUOTE Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Using %BQUOTE and %NRBQUOTE Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Examples Using %BQUOTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Referring to Already Quoted Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Deciding How Much Text to Mask with a Macro Quoting Function . . . . . . . . . . . . 93
%SUPERQ Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using %SUPERQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Examples Using %SUPERQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using the %SUPERQ Function to Prevent Warning Messages . . . . . . . . . . . . . . . . 94
Using the %SUPERQ Function to Enter Macro Keywords . . . . . . . . . . . . . . . . . . . 95
Summary of Macro Quoting Functions and the Characters That They Mask . . . . 96
Unquoting Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Restoring the Significance of Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Example of Unquoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
What to Do When Automatic Unquoting Does Not Work . . . . . . . . . . . . . . . . . . . . 99
How Macro Quoting Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Other Functions That Perform Macro Quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Functions That Start with the Letter Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Example Using the %QSCAN Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
81
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset