I am starting this new thread because the problem I was facing before has now changed. I am trying to define a mata function, that uses Stata's IF argument. I have managed to do it with some success, however, after the function is executed, and I return to Stata, it will show dot and not execute any command unless I press the close curly brackedt i.e. }. I do not understand why this happens
Code:
mata
mata clear
void f()
{
stata(`"if year(date("$S_DATE", "DMY"))<2016{"')
stata(`"display as error "Ticket has expired, please renew it ""')
stata("}")
}
mata mosave f()
end
mata: f()

Comment