gr_rename.ado
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· ADO 代码 · 共 38 行
ADO
38 行
*! version 1.0.5 14jan2005
program define gr_rename
version 8
syntax namelist(min=1 max=2) [ , replace ]
local n : word count `namelist'
if (`n'==1) {
gr_current from : , query
local to `namelist'
}
else {
gettoken from to : namelist
local to `to' // sic
}
gs_stat exists `from'
if ("`from'"=="`to'") exit
if "`replace'" != "" {
gs_stat type : `to'
if ("`type'"=="exists") graph drop `to'
else di as txt "(note: graph `to' not found)"
}
else gs_stat !exists `to'
capture window manage rename graph `from' `to'
.`to' = .`from'.ref
gr_drop `from'
_gs_addgrname `to' // register to name
// may be current graph
if "`._Gr_Global.current_graph_resync'" == "`from'" {
._Gr_Global.set_current_graph "`to'"
}
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?