I have been doing some statistics work with Stata recently and not enjoying it very much.
It doesn't feel to me like it's a "proper" programming language: in particular I don't think there's a way to loop until a condition is met.
Am I right in my feeling, or is Stata truly Turing-complete?
I've never heard of Stata before but the webpage brags that it has "if, while" and "looping and branching".
Wikibooks has this example:
local k = 1
file open myfile using toto.txt, read text
file read myfile line
while r(eof) == 0 {
local k = `k' + 1
di "`k' `line'"
file read myfile line
}
file close myfile
I don't know what "proper" programming language means but at first glance it definitely appears to be Turing-complete.
A "proper" programming language in the sense that you could build a webpage or GUI with it? Of course not. But that's a bit extreme. You can certainly write loops with .ado and .do files; i would say it is turing complete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With