📄 macro.hlp
字号:
{smcl}
{* 09feb2005}{...}
{cmd:help macro}, {cmd:help global}, {cmd:help local},
{cmd:help tempvar}, {cmd:help tempname}, {cmd:help tempfile}
{hline}
{title:Title}
{p2colset 5 18 20 2}{...}
{p2col :{hi:[P] macro} {hline 2}}Macro definition and manipulation{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}{cmdab:gl:obal}{space 3}{it:mname} {space 1} [{cmd:=}{it:exp} |
{cmd::}{it:{help extended_fcn}} |
[{cmd:`}]{cmd:"}[{it:string}]{cmd:"}[{cmd:'}] ]
{p 8 17 2}{cmdab:loc:al}{space 4}{it:lclname} [{cmd:=}{it:exp} |
{cmd::}{it:{help extended_fcn}} |
[{cmd:`}]{cmd:"}[{it:string}]{cmd:"}[{cmd:'}] ]
{p 8 17 2}{cmd:tempvar}{space 2}{it:lclname} [{it:lclname} [{it:...}]]
{p 8 17 2}{cmd:tempname} {it:lclname} [{it:lclname} [{it:...}]]
{p 8 17 2}{cmd:tempfile} {it:lclname} [{it:lclname} [{it:...}]]
{p 8 17 2}{cmdab:loc:al} {c -(} {cmd:++}{it:lclname} | {cmd:--}{it:lclname} {c )-}
{p 8 14 2}{cmdab:ma:cro} {cmdab:di:r}
{p 8 14 2}{cmdab:ma:cro} {cmd:drop} {c -(} {it:mname} [{it:mname} [{it:...}]] |
{it:mname}{cmd:*} | {cmd:_all} {c )-}
{p 8 14 2}{cmdab:ma:cro} {cmdab:l:ist} [ {it:mname} [{it:mname} [{it:...}]] |
{cmd:_all} ]
{p 8 14 2}{cmdab:ma:cro} {cmdab:s:hift} [{it:#}]
{p 8 14 2} [{it:...}] {cmd:`}{it:expansion_optr}{cmd:'} [{it:...}]
{pstd}
where {it:expansion_optr} is
{pmore}
{it:lclname}{break}
{cmd:++}{it:lclname}{break}
{it:lclname}{cmd:++}{break}
{cmd:--}{it:lclname}{break}
{it:lclname}{cmd:--}{break}
{cmd:=}{it:exp}{break}
{cmd::}{it:{help extended_fcn}}{break}
{cmd:.}{it:class_directive}{break}
{cmd:macval(}{it:lclname}{cmd:)}
{title:Description}
{pstd}
{cmd:global} assigns strings to specified global macro names ({it:mnames}).
{cmd:local} assigns strings to local macro names ({it:mnames}). Both
double quotes ({cmd:"} and {cmd:"}) and compound double quotes
({cmd:`"} and {cmd:"'}) are allowed; see {help quotes}. If the {it:string}
has embedded quotes, compound double quotes are needed.
{pstd}
{cmd:tempvar} assigns names to the specified local macro names that may be
used as temporary variable names in a dataset. When the program or do-file
concludes, any variables with these assigned names are dropped.
{pstd}
{cmd:tempname} assigns names to the specified local macro names that may be
used as temporary scalar or matrix names. When the program or do-file
concludes, any scalars or matrices with these assigned names are dropped.
{pstd}
{cmd:tempfile} assigns names to the specified local macro names that may be
used as names for temporary files. When the program or do-file concludes, any
datasets created with these assigned names are erased.
{pstd}
{cmd:macro} manipulates global and local macros.
{pstd}
The macro expansion operators {it:expansion_optr} are documented in
{hi:[P] macro} and {hi:[P] class}. For a description of {it:class_directive}
see {hi:[P] class}.
{title:Also see}
{psee}
Manual: {bf:[P] macro}
{psee}
Online: {helpb char}, {helpb gettoken},
{help macrolists}, {helpb matrix},
{helpb preserve}, {helpb program},
{help quotes}, {helpb return},
{helpb scalar}, {helpb syntax}, {helpb tokenize}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -