Dear Statalisters,
I need to use the goto syntax to translate a Fortran program in Mata. There are obviously better solutions than using goto, but the Fortran program relies heavily on this goto syntax and so I want to keep it for a first translation in Mata. I tried to run the basic goto example given on the Mata help page (Mata Reference Manual, p 128) with Mata in interactive mode and the code crashes:
mata:
a = 4/3
s10: b = a - 1
c = 3*b
eps = abs(c-1)
if(eps==0) goto s10
end
The mistake is "Unexpected end of line". Why is the end statement ambiguous here?
Regards,
Yannick Guyonvarch
I need to use the goto syntax to translate a Fortran program in Mata. There are obviously better solutions than using goto, but the Fortran program relies heavily on this goto syntax and so I want to keep it for a first translation in Mata. I tried to run the basic goto example given on the Mata help page (Mata Reference Manual, p 128) with Mata in interactive mode and the code crashes:
mata:
a = 4/3
s10: b = a - 1
c = 3*b
eps = abs(c-1)
if(eps==0) goto s10
end
The mistake is "Unexpected end of line". Why is the end statement ambiguous here?
Regards,
Yannick Guyonvarch
Comment