This costed me so much time. I eventually figured it out, but it still makes no sense. It is potentially a bug, unless I am missing something here...
So, why arguments cannot begin with "no" in a Stata program? Here is an example. Run it and see (I'm using Stata 14.1 on MacBook pro 10.10)
When I run this, I only get only two arguments printed which are:
But why? Why the other arguments do not get interpreted? and why making abbreviation possible (i.e. for "noproblem" argument) will let me apply the argument?
PS if the argument is all written in capital letters, it works fine, e.g. [NOTE] would work
So, why arguments cannot begin with "no" in a Stata program? Here is an example. Run it and see (I'm using Stata 14.1 on MacBook pro 10.10)
Code:
cap prog drop argtest prog argtest syntax [anything], [nothanks] [yesplease] [nothing] [note] [NOproblem] //NOTICE THE CAPITAL LETTERS IN "NOPROBLEM" display "`nothanks' `yesplease' `nothing' `note' `noproblem' end argtest , nothanks yesplease nothing note noproblem
Code:
yesplease noproblem
PS if the argument is all written in capital letters, it works fine, e.g. [NOTE] would work
Comment