⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syntax.hlp

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 HLP
📖 第 1 页 / 共 2 页
字号:

{pstd}
If you type nothing, the command does not allow weights.  A command
may not allow both a weight and an {cmd:=}{it:exp}.

{pstd}
You must type {cmd:[} and {cmd:]}; they are not optional.  Weights are always
optional.

{pstd}
The first weight specified is the default weight type.

{pstd}
After the {cmd:syntax} command, the resulting weight and expression are
returned in {cmd:`weight'} and {cmd:`exp'}.  {cmd:`weight'} contains the
weight type or nothing if no weights were specified.  {cmd:`exp'} contains
{cmd:=}, a space, and the expression, unless you specified {cmd:/}; in which
case, {cmd:`exp'} contains just the expression.


{marker description_of_options}{...}
{title:description_of_options}

	type                {it:nothing}
     or
	type                {cmd:[,}
	type                {it:option_descriptors}
	optionally type     {cmd:*}
	type                {cmd:]}
     or
	type                {cmd:,}
	type                {it:option_descriptors} (these will be required options)
	optionally type     {cmd:[}
	optionally type     {it:option_descriptors} (these will be optional options)
	optionally type     {cmd:*}
	optionally type     {cmd:]}

    Examples:
	{cmd:syntax} {it:...} {cmd:[, MYopt Thisopt]}
	{cmd:syntax} {it:...} {cmd:, MYopt Thisopt}
	{cmd:syntax} {it:...} {cmd:, MYopt [Thisopt]}
	{cmd:syntax} {it:...} {cmd:[, MYopt Thisopt *]}

{pstd}
If you type nothing, the command does not allow options.

{pstd}
The brackets distinguish optional from required options.  All options can be 
optional, all options can be required, or some can be optional and other be
required.

{pstd}
After the {cmd:syntax} command, options are returned to you in local macros
based on the first 31 letters of each option's name.  If you also specify
{cmd:*}, any remaining options are collected and placed, one after the other
in {cmd:`options'}.  If you do not specify {cmd:*}, an error is returned if
the user specifies any options that you do not list.

{pstd}
The {it:option_descriptors} include

		{it:{help syntax##optionally_on:optionally_on}}
		{it:{help syntax##optionally_off:optionally_off}}
		{it:{help syntax##optional_integer_value:optional_integer_value}}
		{it:{help syntax##optional_real_value:optional_real_value}}
		{it:{help syntax##optional_confident_interval:optional_confidence_interval}}
		{it:{help syntax##optional_numlist:optional_numlist}}
		{it:{help syntax##optional_varlist:optional_varlist}}
		{it:{help syntax##optional_namelist:optional_namelist}}
		{it:{help syntax##optional_string:optional_string}}
		{it:{help syntax##optional_passthru:optional_passthru}}


{marker optionally_on}{...}
{title:option_descriptor optionally_on}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:replace} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:REPLACE} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:detail} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Detail} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:CONStant} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.  Thus option {cmd:replace} is returned in
local macro {cmd:`replace'}, option {cmd:detail} in local macro
{cmd:`detail'}, and option {cmd:constant} in local macro {cmd:`constant'}.

{pstd}
The macro contains nothing if not specified, or else it contains the macro's
name, fully spelled out.

{pstd}
Warning:  be careful if the first two letters of the option's name are
{cmd:no}, such as the option called {cmd:notice}.  You must capitalize at
least the {cmd:N} in such cases.


{marker optionally_off}{...}
{title:option_descriptor optionally_off}

	type                {cmd:no}
	type                {it:OPname}   (capitalization indicates minimal abbrev.)

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:noreplace} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:noREPLACE} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:nodetail} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:noDetail} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:noCONStant} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name, excluding {cmd:no}.  Thus option
{cmd:noreplace} is returned in local macro {cmd:`replace'}, option
{cmd:nodetail} in local macro {cmd:`detail'}, and option {cmd:noconstant} in
local macro {cmd:`constant'}.

{pstd}
The macro contains nothing if not specified, or else it contains the macro's
name, fully spelled out, with a {cmd:no} prefixed.  That is, in the 
{cmd:noREPLACE} example above, macro {cmd:`replace'} contains nothing,
or it contains {cmd:noreplace}.


{marker optional_integer_value}{...}
{title:option_descriptor optional_integer_value}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(integer}
	type                {it:#} (unless the option is required)
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Count(integer 3)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:SEQuence(integer 1)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:dof(integer -1)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the integer specified by the user, or else it contains 
the default value.


{marker optional_real_value}{...}
{title:option_descriptor optional_real_value}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(real}
	type                {it:#} (unless the option is required)
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Mean(real 2.5)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:SD(real -1)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the real number specified by the user, or else it contains
the default value.


{marker optional_confidence_interval}{...}
{title:option_descriptor optional_confidence_interval}

	type		    {it:OPname}   (capitalization indicates minimal abbrev.)
	type		    {cmd:(cilevel)}
	
    Example:
        {cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Level(cilevel)} {it:...}
        
{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
If the user specifies a valid level for a confidence interval, the macro
contains that value; see {help level}.  If the user specifies an invalid
level, an error message is issued, and the return code 198.

{pstd}
If the user does not type this option, the macro contains the current
default level as stored in {cmd:c(level)}.


{marker optional_numlist}{...}
{title:option_descriptor optional_numlist}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(numlist}
	type                {cmdab:asc:ending}  or  {cmdab:desc:ending}  or {it:nothing}
	optionally type     {cmdab:int:eger}
	optionally type     {cmdab:miss:ingokay}
	optionally type     {cmd:min=}{it:#}
	optionally type     {cmd:max=}{it:#}
	optionally type     {cmd:>}{it:#}  or  {cmd:>=}{it:#}   or {it:nothing}
	optionally type     {cmd:<}{it:#}  or  {cmd:<=}{it:#}   or {it:nothing}
	optionally type     {cmd:sort}
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:VALues(numlist)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:VALues(numlist max=10 sort)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Time(numlist >0)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:FREQuency(numlist >0 integer)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:OCCur(numlist missingokay >=0 <1e+9)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the values specified by the user, but listed out, one after
the other.  For instance, the user might specify {hi:time(1(1)4,10)} so that
the local macro {cmd:`time'} would contain "{hi:1 2 3 4 10}".

{pstd}
{cmd:min} and {cmd:max} specify the minimum and maximum number of elements
that may be in the list.

{pstd}
{cmd:<}, {cmd:<=}, {cmd:>}, and {cmd:>=} specify the range of elements allowed
in the list.

{pstd}
{cmd:integer} indicates that the user may specify integer values only.

{pstd}
{cmd:missingokay} indicates that the user may specify {help missing:missing
values} (a single period) as a list element.

{pstd}
{cmd:ascending} specifies that the user must give the list in ascending order
without repeated values.  {cmd:descending} specifies that the user must
give the list in descending order without any repeated values.

{pstd}
{cmd:sort} specifies that the list be sorted before being returned.
Distinguish this from modifier {cmd:ascending}, which states that the user
must type the list in ascending order.  {cmd:sort} says the user may type the
list in any order but it is to be returned in ascending order.
{cmd:ascending} states that the list may have no repeated elements.
{cmd:sort} places no such restriction on the list.


{marker optional_varlist}{...}
{title:option_descriptor optional_varlist}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(varlist}   or   {cmd:(varname}
	optionally type     {cmdab:num:eric}    or   {cmdab:str:ing}
	optionally type     {cmd:min=}{it:#}
	optionally type     {cmd:max=}{it:#}
	optionally type     {cmd:ts}
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:ROW(varname)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:BY(varlist)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Counts(varname numeric)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:TItlevar(varname string)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Sizes(varlist numeric min=2 max=10)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the names specified by the user, listed one after the
other.

{pstd}
{cmd:min} indicates the minimum number of variables to be specified if the
option is given.  {hi:min=1} is the default.

{pstd}
{cmd:max} indicates the maximum number of variables that may be specified
if the option is given.  {hi:max=800} is the default for {cmd:varlist}
(you may set it to be larger), and {hi:max=1} is the default for {cmd:varname}.

{pstd}
{cmd:numeric} specifies that the variable list must be comprised entirely
of numeric variables; {cmd:string} specifies string variables.

{pstd}
{cmd:ts} indicates the variable list may contain time-series operators.


{marker optional_namelist}{...}
{title:option_descriptor optional_namelist}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(namelist}   or   {cmd:(name}
	optionally type     {cmd:min=}{it:#}
	optionally type     {cmd:max=}{it:#}
	optionally type     {cmd:local}
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:GENerate(name)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:MATrix(name)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:REsults(namelist min=2 max=10)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the variables specified by the user, listed one after the
other.

{pstd}
Do not confuse {cmd:namelist} with {cmd:varlist}.  {cmd:varlist} is the
appropriate way to specify an option that is to receive the names of existing
variables.  {cmd:namelist} is the appropriate way to collect names of other
things{hline 2}such as matrices{hline 2}and {cmd:namelist} is sometimes
used to obtain the name of a new variable to be created.  In that case, it is
your responsibility to verify that the name specified does not already
exist as a Stata variable.

{pstd}
{cmd:min} indicates the minimum number of names to be specified if the
option is given.  {hi:min=1} is the default.

{pstd}
{cmd:max} indicates the maximum number of names that may be specified
if the option is given.  The default is {hi:max=1} for {cmd:name}.  For
{cmd:namelist}, the default is the maximum number of variables allowed in
Stata.

{pstd}
{cmd:local} specifies that the names the user specifies are to satisfy the
naming convention for local macronames.


{marker optional_string}{...}
{title:option_descriptor optional_string}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmdab:(str:ing}
	optionally type     {cmd:asis}
	type                {cmd:)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Title(string)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:XTRAvars(string)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:SAVing(string asis)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the string specified by the user, or else it contains
nothing.

{pstd}
{cmd:asis} specifies that the option's arguments be returned just as
the user typed them, without quotes stripped but with leading and trailing
blanks.  {cmd:asis} should be specified if the option's arguments might
contain suboptions or expressions which contain quoted strings.  If you
specify {cmd:asis}, be sure to use compound double quotes when referring to
the macro.


{marker optional_passthru}{...}
{title:option_descriptor optional_passthru}

	type                {it:OPname}   (capitalization indicates minimal abbrev.)
	type                {cmd:(passthru)}

    Examples:
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:Title(passthru)} {it:...}
	{cmd:syntax} {it:...} {cmd:,} {it:...} {cmd:SAVing(passthru)} {it:...}

{pstd}
The result of the option is returned in a macro name formed by the first
31 letters of the option's name.

{pstd}
The macro contains the full option{hline 2}unabbreviated option name,
parentheses, and argument{hline 2}as specified by the user, or it contains
nothing if the user did not specify the option.  For instance, were the user
to type {hi:ti("My Title")} the macro would contain {hi:title("My Title")}.


{title:Also see}

{psee}
Manual:  {bf:[P] syntax}

{psee}
Online:  {help language}, {helpb program};
{helpb args}, {helpb gettoken}, {helpb mark}, {help nlist}, {helpb tokenize},
{helpb tsrevar}, {helpb unab}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -