📄 opts_exclusive.hlp
字号:
{smcl}
{* 10mar2005}{...}
{cmd:help opts_exclusive}{right:also see: {help undocumented}}
{hline}
{title:Title}
{p 4 24 2}
{hi:opts_exclusive} {hline 2} Programmer's utility for mutually exclusive
options
{title:Syntax}
{p 8 23 2}
{cmd:opts_exclusive} {cmd:"}{it:opts}{cmd:"}
[[{it:option_name}] {it:return_code}]
{title:Description}
{pstd}
{cmd:opts_exclusive} is a programmer's command for displaying an appropriate
message and return code when mutually exclusive options are encountered.
{it:opts} is the list of mutually exclusive options or suboptions. If there
are less than two options listed in {it:opts}, {cmd:opts_exclusive} silently
exits with a 0 return code. With more than 2 options in {it:opts}, an error
message is displayed and the return code set. In the case of suboptions,
{it:option_name} indicates the option name. The default return code is 198.
{it:return_code} specifies a different return code.
{title:Examples}
{cmd:. opts_exclusive "a b" myopt}
{p 4 4 2}
{err:option myopt() invalid; only one of a or b are allowed}
{p_end}
{search r(198):r(198);}
{cmd:. opts_exclusive "this that other" xyz 274}
{p 4 4 2}
{err:option xyz() invalid; only one of this, that, or other are allowed}
{p_end}
{search r(274):r(274);}
{cmd:. opts_exclusive "green yellow red blue"}
{p 4 4 2}
{err:only one of green, yellow, red, or blue are allowed}
{p_end}
{search r(198):r(198);}
{title:Also see}
{psee}
Online: {helpb error}, {helpb exit}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -