One other thing Joseph (#13)--you're right, there was another command with *_`i' that was causing the problem--it was after the first close brace from the first set of Mata commands.
JT
JT
version 17.0 clear * * * if * while 0 { if 0 { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * if elseif else * while 0 { if 0 { mata: printf("Mata here\n") } else if 0 { mata: printf("Mata here\n") } else { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * quietly * while 0 { quietly { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * capture * while 0 { capture { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * foreach * while 0 { foreach dummy in "a" "b" { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * foralues * while 0 { forvalues i = 1/2 { mata: printf("Mata here\n") } display in smcl as text "Stata here" } * * mata {} * while 0 { mata { printf("Mata here\n") } display in smcl as text "Stata here" } * * mata { * } * while 0 { mata { printf("Mata here\n") } display in smcl as text "Stata here" } exit
mata { . . . . }
Comment