exp.hlp

来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 58 行

HLP
58
字号
{smcl}
{* 06apr2005}{...}
{cmd:help exp}
{hline}

{title:Title}

{pstd}
{hi:[U] 13 Functions and expressions}


{title:Remarks}

{pstd}
Algebraic and string expressions are specified in a natural way using the
standard rules of hierarchy.  You may use parentheses freely to force a
different order of evaluation.

{pstd}
For example:

{phang2}{cmd:. generate new = myv+2/oth}

{pstd}
is interpreted as

{phang2}{cmd:. generate new = myv+(2/oth)}

{pstd}
If you wanted (myv+2)/oth, you could type

{phang2}{cmd:. generate new = (myv+2)/oth}


{pstd}
Expressions are found in several places in the Stata language; see
{help language}.  The "{cmd:=}{it:exp}" language element is demonstrated above
with the {helpb generate} command.  The "{cmd:if} {it:exp}" language element is
another place where expressions are allowed.  Almost all Stata commands allow
the "{cmd:if} {it:exp}".  For instance in

{phang2}{cmd:. summarize mrg dvc if region=="West" & mrg>.02}

{pstd}
the {cmd:region=="West" & mrg>.02} is a logical expression.


{title:Also see}

{psee}
Manual:  {bf:[U] 11 Language syntax},{break}
{bf:[U] 13 Functions and expressions}

{psee}
Online:  {help datatypes}, {help functions},
{help language}, {help operators}, {help subscripting}; {help quotes}
{p_end}

⌨️ 快捷键说明

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