📄 unab.hlp
字号:
{smcl}
{* 10feb2005}{...}
{cmd:help unab}, {cmd:help tsunab}
{hline}
{title:Title}
{p2colset 5 17 19 2}{...}
{p2col :{hi:[P] unab} {hline 2}}Unabbreviate variable list{p_end}
{p2colreset}{...}
{title:Syntax}
{pstd}
Standard variable lists
{p 8 13 2}{cmd:unab} {it:lmacname} {cmd::} [{varlist}] [{cmd:,}
{cmd:min(}{it:#}{cmd:)} {cmd:max(}{it:#}{cmd:)}
{cmd:name(}{it:string}{cmd:)}]
{pstd}
Variable lists that may contain time-series operators
{p 8 15 2}{cmd:tsunab} {it:lmacname} {cmd::} [{varlist}] [{cmd:,}
{cmd:min(}{it:#}{cmd:)} {cmd:max(}{it:#}{cmd:)}
{cmd:name(}{it:string}{cmd:)}]
{title:Description}
{pstd}
{cmd:unab} expands and unabbreviates a {varlist} of existing variables,
placing the results in the local macro {it:lmacname}. {cmd:unab} is a
low-level parsing command. The {cmd:syntax} command is a high-level parsing
command that, among other things, also unabbreviates variable lists; see
{helpb syntax}.
{pstd}
The difference between {cmd:unab} and {cmd:tsunab} is that {cmd:tsunab}
allows time-series operators to modify the variables in {varlist}.
{title:Options}
{phang}{cmd:min(}{it:#}{cmd:)} specifies the minimum number of variables
allowed. The default is {hi:min(1)}.
{phang}{cmd:max(}{it:#}{cmd:)} specifies the maximum number of variables
allowed. The default is {hi:max(32000)}.
{phang}{cmd:name(}{it:string}{cmd:)} provides a label that is used when
printing error messages.
{title:Examples}
{pstd}
Within a program that did the high-level command parsing using
{helpb syntax}, as in
{phang2}{cmd:syntax varname [if] [in], BY(string)} {it:...}
{pstd}
Further low-level parsing might be needed. For instance,
{cmd:capture confirm var `by'}
{cmd:if _rc == 0 {c -(}}
{cmd:unab by : `by', max(1) name(by())}
{cmd:{c )-}}
{cmd:else {c -(}}
{it:...} {txt}something else is done with {cmd:`by'} {it:...}
{cmd:{c )-}}
{pstd}
Within a program that allows time-series variable lists, you might have
{cmd:tsunab myvar : `myvar'}
{pstd}
The local macro {hi:myvar} would then contain the unabbreviated variable
list with time-series operators (if any) in standard form.
{title:Also see}
{psee}
Manual: {bf:[P] unab}
{psee}
Online: {helpb syntax}, {helpb time}, {helpb tsrevar}, {helpb unabcmd}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -