📄 mata_which.hlp
字号:
{smcl}
{* 18mar2005}{...}
{cmd:help mata which}
{hline}
{* index mata tt}{...}
{* index which tt}{...}
{* index .mo file}{...}
{* index .mlib library files}{...}
{* index libraries}{...}
{title:Title}
{p 4 4 2}
{bf:[M-3] mata which -- Identify function}
{title:Syntax}
{p 8 16 2}
: {cmd:mata} {cmd:which}
{it:fcnname}{cmd:()}
{p 4 4 2}
This command is for use in Mata mode following Mata's colon prompt.
To use this command from Stata's dot prompt, type
. {cmd:mata: mata which} ...
{title:Description}
{p 4 4 2}
{cmd:mata which} {it:fcnname}
looks for {it:fcnname}{cmd:()} and reports whether
it is built-in, stored in a .mlib library, or stored in a .mo file.
{title:Remarks}
{p 4 4 2}
{cmd:mata} {cmd:which} {it:fcnname}{cmd:()} looks for
{it:fcnname}{cmd:()} and reports where it is found:
: {cmd:mata which I()}
I(): built-in
: {cmd:mata which assert()}
assert(): lmatabase.mlib
: {cmd:mata which myfcn()}
userfunction(): .\myfcn.mo
: {cmd:mata which nosuchfunction()}
{err:function nosuchfunction() not found}
r(111);
{p 4 4 2}
Function {cmd:I()} is built-in; it was written in C and is a part of Mata
itself.
{p 4 4 2}
Function {cmd:assert()} is a library function and, as a matter of fact,
its executable object code is located in the official
function library lmatabase.
{p 4 4 2}
Function {cmd:myfcn()} exists and has its executable object code stored
in file {cmd:myfcn.mo}, located in the current directory.
{p 4 4 2}
Function {cmd:nosuchfunction()} does not exist.
{p 4 4 2}
Going back to {cmd:mata} {cmd:which} {cmd:assert()}, which was found in
lmatabase.mlib, if you wanted to know where
lmatabase.mlib was stored, you could
type {cmd:findfile} {cmd:lmbatabase.mlib}
at the Stata prompt; see
{bf:{help findfile:[P] findfile}}.
{title:Also see}
{p 4 13 2}
Manual: {hi:[M-3] mata which}
{p 4 13 2}
Online: help for
{bf:{help m3_intro:[M-3] intro}}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -