The code below runs without error message if I execute it line by line.
If I execute this do-file from another do-file like:
I get an invalid syntax r(198); error message.
If I comment the "macro 1" version of makeList above and use the "macro 2" version of makeList instead, the code runs without error message.
I would like to use the "macro 1" version for better readability. Is there a work-a-around?
Code:
------------------------------------begin example.do--- clear sysuse auto /* macro 1 */ local makeList `" /// "Buick Century" /// "Pont. Sunbird" /// "BMW 320i" /// "' /* macro 2 */ * local makeList `" "Buick Century" "Pont. Sunbird" "BMW 320i" "' foreach i of local makeList { di "`i'" } ------------------------------------end example.do---
Code:
do example
If I comment the "macro 1" version of makeList above and use the "macro 2" version of makeList instead, the code runs without error message.
I would like to use the "macro 1" version for better readability. Is there a work-a-around?
Comment