📄 use_option.dlg
字号:
/*
use
*! VERSION 1.0.0 23nov2004
*/
VERSION 9.0
INCLUDE _std_medium
INCLUDE _ht200
INCLUDE header
HELP hlp1, view("help use")
RESET res1
DIALOG main, tabtitle("Main") ///
label("use - Load Stata dataset")
BEGIN
TEXT tx_using _lft _top _iwd ., ///
label("Filename:")
FILE fi_using @ _ss @ ., ///
option(using) ///
error("Filename") ///
label("Browse...") defext(dta) ///
filter("Stata File (*.dta)|*.dta|All (*.*)|*.*")
TEXT tx_vars _lft _ls _ibwd ., ///
label("Variables to use: (optional)")
EDIT ed_vars @ _ss _iwd ., ///
label("Variables to use") ///
option("Variables to use")
CHECKBOX ck_clear _lft +35 _iwd ., ///
option(clear) nomem ///
label("Replace data in memory")
CHECKBOX ck_nolabel @ _ms @ ., ///
label("Omit value labels from the saved dataset.") ///
option(nolabel)
END
// begin ifin.idlg reproduced
DEFINE fromwd 34
DEFINE fromsep +39
DEFINE towd 15
DEFINE tosep +20
DIALOG sub, tabtitle("if/in")
BEGIN
GROUPBOX gb_ifin _lft _top _iwd _ht10, ///
label("Restrict to observations")
TEXT tx_if _ilft _ss _inwd ., ///
label("If: (expression)")
EXP ex_if @ _ss @ ., ///
label("Create...")
CHECKBOX ck_in @ +35 @ ., ///
label("Use a range of observations") ///
onclickon(script ifin_enable_in) ///
onclickoff(script ifin_disable_in)
TEXT tx_from @ _ss fromwd ., ///
label("From:") right
SPINNER sp_from fromsep @ 70 ., ///
min(1) max(10000000) default(1)
TEXT tx_to +75 @ towd ., ///
label("to:") right
SPINNER sp_to tosep @ 70 ., ///
min(1) max(10000000) default(1)
END
SCRIPT ifin_enable_in
BEGIN
sub.sp_from.enable
sub.tx_to.enable
sub.sp_to.enable
sub.tx_from.enable
END
SCRIPT ifin_disable_in
BEGIN
sub.sp_from.disable
sub.sp_to.disable
sub.tx_to.disable
sub.tx_from.disable
END
// end ifin.idlg reproduced
PROGRAM command
BEGIN
require main.fi_using
put "use "
varlist [main.ed_vars]
ifexp sub.ex_if
if sub.ck_in {
inrange sub.sp_from sub.sp_to
}
if main.ed_vars | sub.ex_if | sub.ck_in {
put "using "
}
put `"""' main.fi_using `"""'
beginoptions
option main.ck_clear
option main.ck_nolabel
endoptions
END
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -