Dear All,
I am having a problem with the following code:
When this code is executed in Stata v17.0 (Windows), for some reason Stata objects the highlighted line resulting in error message:
program error: code follows on the same line as open brace
r(198);
This is strange, because the line should not be executed, and the trace indicates this as well:

I believe the code should be working as Stata's manual says "...braces ({ }) can be used to clarify meaning and to form nested constructions." (see help macro).
Any guidance on this or a confirmation of a bug is much appreciated.
Thank you, Sergiy Radyakin
I am having a problem with the following code:
Code:
clear all
version 17.0
program define foobar
global framename=""
display `"Frame name is: ${framename}"'
if ("${framename}"!="") {
frame ${framename} {
describe
}
}
end
set trace on
foobar
/* end of file */
program error: code follows on the same line as open brace
r(198);
This is strange, because the line should not be executed, and the trace indicates this as well:
I believe the code should be working as Stata's manual says "...braces ({ }) can be used to clarify meaning and to form nested constructions." (see help macro).
Any guidance on this or a confirmation of a bug is much appreciated.
Thank you, Sergiy Radyakin
Comment