Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: ado file help


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: ado file help
Date   Tue, 14 Aug 2012 00:26:40 +0200

Tashi,

please read the help file for -syntax- carefully. This is all clearly
documented. The help file reads

Standard Stata syntax is

      cmd [varlist | namelist | anything]
               [if]
               [in]
               [using filename]
               [= exp]
               [weight]
               [, options]

You should by now know, that "[...] square brackets distinguish
optional from required " elements (also see -help language-). So,
clearly -varlist-, -namelist- and -anything- are optional. Neither has
to be defined.

You can try this typing

pr foo
    di "foobar"
end

foo

This will work.

The help file continues

"After the syntax command, options are returned to you in local macros
based on the first 31 letters of each option's name."

Meaning that in

, Foo(str)

whatever the user enters as <str> will be returned in local macro foo.

Best
Daniel

-- 
Sorry Nick, this doesn't help much.
1. Do we not need to define varlist/namelist/anything after syntax
2. How do you put it as macro in the query.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index