📄 nlist.hlp
字号:
{smcl}
{* 09feb2005}{...}
{cmd:help nlist} ({hi:numlist} command)
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[P] numlist} {hline 2}}Parse numeric lists{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmd:numlist} {cmd:"}{it:numlist}{cmd:"} [{cmd:,} {cmdab:asc:ending}
{cmdab:desc:ending} {cmdab:int:eger} {cmdab:miss:ingokay}
{cmd:min(}{it:#}{cmd:)} {cmd:max(}{it:#}{cmd:)}
{cmdab:r:ange:(}{it:operator#} [{it:operator#}]{cmd:)} {cmd:sort}]
{pstd}where {it:operator} is {cmd:<} | {cmd:<=} | {cmd:>} | {cmd:>=}
{pmore}Note there is no space between {it:operator} and {it:#}; for example,
{cmd:range(>=0)}
{cmd:range(>=0 <=20)}
{cmd:range(>0 <=50)}
{pstd}and where {it:numlist} consists of one or more
{it:{help numlist:numlist_elements}}.
{title:Description}
{pstd}
The {cmd:numlist} command expands the numeric list supplied as a string
argument and performs error checking based on the options specified. Any
numeric sequence operators in the {it:numlist} string are evaluated, and the
expanded list of numbers is returned in {hi:r(numlist)}. See {help numlist}
for a discussion of numeric lists. Also see {helpb syntax} for a more
comprehensive command that will also parse numeric lists.
{title:Options}
{phang}{cmd:ascending} indicates that the user must give the numeric list in
ascending order without repeated values. This is different from the {cmd:sort}
option.
{phang}{cmd:descending} indicates that the numeric list must be given in
descending order without repeated values.
{phang}{cmd:integer} specifies that the user may only give integer values in
the list.
{phang}{cmd:missingokay} indicates that missing values are allowed in the
numeric list. By default, missing values are not allowed.
{phang}{cmd:min(}{it:#}{cmd:)} specifies the minimum number of elements
allowed in the numeric list. The default is {cmd:min(1)}. If you want to
allow empty numeric lists, specify {cmd:min(0)}.
{phang}{cmd:max(}{it:#}{cmd:)} specifies the maximum number of elements
allowed in the numeric list. The default is {cmd:max(1600)}.
{phang}{cmd:range(}{it:operator#} [{it:operator#}]{cmd:)} specifies the
acceptable range for the values in the numeric list. No space is allowed
between the {it:operator} and the {it:#}.
{phang}{cmd:sort} specifies that the returned numeric list is to be sorted.
This is different from the {cmd:ascending} option, which places the
responsibility for providing a sorted list on the user who will not be allowed
to enter a nonsorted list. {cmd:sort}, on the other hand, puts no restriction
on the user and takes care of sorting the list. Repeated values are also
allowed with {cmd:sort} .
{title:Example}
{phang}{cmd:. numlist "`nlst'" , min(2) max(40) sort integer range(<=100 >=0)}
{title:Also see}
{psee}
Manual: {bf:[P] numlist}
{psee}
Online: {help numlist}; {helpb syntax}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -