contract.dlg
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· DLG 代码 · 共 144 行
DLG
144 行
/*
contract
*! VERSION 1.1.0 17nov2004
*/
VERSION 9.0
INCLUDE _std_glm
INCLUDE _ht340
INCLUDE header
HELP hlp1, view("help contract")
RESET res1
DIALOG main, tabtitle("Main") ///
label("contract - Make dataset of frequencies and percentages")
BEGIN
TEXT tx_var _lft _top _iwd ., ///
label("Variables:")
VARLIST vl_var @ _ss _iwd ., ///
label("Variables")
END
INCLUDE ifin
INCLUDE weights_f
DIALOG opt, tabtitle("Options")
BEGIN
TEXT tx_freq _lft _top _cwd2 ., ///
label("Name of frequency variable:")
EDIT ed_freq @ _ss _vnwd ., ///
label("Name of frequency variable") ///
max(32) ///
option("freq") ///
default(_freq)
CHECKBOX ck_cfreq @ _ls _cwd2 ., ///
label("Create cumulative frequency variable:") ///
onclickon(opt.ed_cfreq.enable) ///
onclickoff(opt.ed_cfreq.disable)
EDIT ed_cfreq @ _ss _vnwd ., ///
label("Cumulative frequency variable") ///
option(cfreq)
GROUPBOX gb_percent @ _ls _iwd _ht12,
CHECKBOX ck_percent _ilft _ss _cwd2 ., ///
label("Create percentage variable:") ///
onclickon(program opt_percent_on) ///
onclickoff(program opt_percent_off)
DEFINE y @y
EDIT ed_percent @ _ss _vnwd ., ///
label("Percentage variable") ///
option(percent)
CHECKBOX ck_cpercent _lft2 y _cwd2 ., ///
label("Create cumulative percentage variable:") ///
onclickon(program opt_cpercent_on) ///
onclickoff(program opt_cpercent_off)
EDIT ed_cpercent @ _ss _vnwd ., ///
label("Cumulative percentage variable") ///
option(cpercent)
CHECKBOX ck_float _ilft _ls _ibwd ., ///
label("Generate percentage variables as type float") ///
option(float)
TEXT tx_format @ _ms @ ., ///
label("Display format for new percentage variables:")
EDIT ed_format @ _ss _vnwd ., ///
label("Display format for new percentage variables") ///
option(format) ///
default("%8.2f")
CHECKBOX ck_zero _lft _xxls _cwd2 ., ///
label("Include combinations with frequency zero") ///
option("zero")
CHECKBOX ck_nomiss @ _ms @ ., ///
label("Drop observations with missing values") ///
option("nomiss")
END
PROGRAM opt_percent_on
BEGIN
call opt.ed_percent.enable
call opt.ck_float.enable
call opt.tx_format.enable
call opt.ed_format.enable
END
PROGRAM opt_cpercent_on
BEGIN
call opt.ed_cpercent.enable
call opt.ck_float.enable
call opt.tx_format.enable
call opt.ed_format.enable
END
PROGRAM opt_percent_off
BEGIN
call opt.ed_percent.disable
if ! opt.ck_cpercent {
call opt.ck_float.disable
call opt.tx_format.disable
call opt.ed_format.disable
}
END
PROGRAM opt_cpercent_off
BEGIN
call opt.ed_cpercent.disable
if ! opt.ck_percent {
call opt.ck_float.disable
call opt.tx_format.disable
call opt.ed_format.disable
}
END
PROGRAM command
BEGIN
put "contract "
varlist main.vl_var
INCLUDE _weights_pr
INCLUDE _ifin_pr
beginoptions
optionarg /hidedefault opt.ed_freq
if opt.ck_cfreq {
require opt.ed_cfreq
optionarg opt.ed_cfreq
}
if opt.ck_percent {
require opt.ed_percent
optionarg opt.ed_percent
}
if opt.ck_cpercent {
require opt.ed_cpercent
optionarg opt.ed_cpercent
}
option opt.ck_float
optionarg /hidedefault opt.ed_format
option opt.ck_zero
option opt.ck_nomiss
endoptions
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?