Hi all,
Apologies if this is simple, but I can't figure this out based on the
documentation.
I'm writing an ado file and am trying to transfer all the macros I
reference inside the file to the command line. Some of the values I want to
make required, and some I want to make optional, but with a default value
if the option is not taken. All of the macros I want in the command line
are numeric.
A representative snippet of the code is below, based on what I've been able
to figure out from the documentation. It gives me an "invalid syntax"
response when I try to "birthsim, startyear(2000)...". It works when I do
it with args, but obviously that's much more cumbersome than syntax in this
context.
program birthsim, rclass
version 11.2
syntax startyear(integer) endyear(integer) [,latestageatbirth(default=50)
]
Thanks in advance,
Stephen
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/