⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 format.dlg

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 DLG
字号:
/*
	format

*!  VERSION 1.1.1  31mar2005

*/

VERSION 9.0

INCLUDE _std_large
INCLUDE _ht320
INCLUDE header
HELP hlp1, view("help format")
RESET res1

DIALOG main, label("format - Specify variable display format") tabtitle("Main")
BEGIN
  TEXT     tx_var        _lft     _top     _iwd        .,		/*
		*/ label("Variables:")
  VARLIST  vl_var           @      _ss        @        .,		/*
		*/ label("Variables")

  GROUPBOX gb_type       _lft      _ls    _cwd1    _ht21,		/*
		*/ label("Type of format")
  DEFINE   _y @y
  RADIO    rb_g       _indent      _ss    _inwd        .,		/*
		*/ first						/*
		*/ option("g")						/*
		*/ clickon("script g_clickon") 				/*
		*/ label("General numeric")
  RADIO    rb_f             @      _ss        @        .,		/*
		*/ option("f")						/*
		*/ clickon("script f_clickon") 				/*
		*/ label("Fixed numeric")
  RADIO    rb_e             @      _ss        @        .,		/*
		*/ option("e")						/*
		*/ clickon("script e_clickon") 				/*
		*/ label("Exponential")
  RADIO    rb_s             @      _ss    _cwd3        .,		/*
		*/ option("s")						/*
		*/ clickon("script s_clickon")	 			/*
		*/ label("String:")
  DEFINE   _x @x
  SPINNER  sp_s      _indent2      _ss    _spwd        ., 		/*
		*/ min(1) max(c(maxstrvarlen)) default(15)		/*
		*/ label("Length")
  TEXT     tx_s        _spsep        @ _rbspr2b        .,		/*
		*/ label("Length")
  RADIO    rb_dd           _x      _ms    _cwd3        .,		/*
		*/ option("d")						/*
		*/ clickon("script dd_clickon") 			/*
		*/ label("Default elapsed date")
  RADIO    rb_ud            @      _ss        @        .,		/*
		*/ option("d")						/*
		*/ clickon("script ud_clickon") 			/*
		*/ label("User-specified elapsed date:")
  EDIT     ed_ud     _indent2      _ss   _en7wd        ., 		/*
		*/ label("User-specified elapsed date")
  BUTTON   bn_ud      _en7sep        @ _rben7r2b       ., 		/*
		*/ label("Help format...") 				/*
  		*/ onpush(view help format##|_new)
  RADIO    rb_ts           _x      _ms     _cwd3       .,		/*
		*/ last 						/*
		*/ option("t")						/*
		*/ clickon("script ts_clickon") 			/*
		*/ label("Time-series:")
  DEFINE   _x @x
  EDIT     ed_ts     _indent2      _ss   _en7wd        ., 		/*
		*/ label("Time-series")
  BUTTON   bn_ts      _en7sep        @ _rben7r2b       ., 		/*
		*/ label("Help format...") 				/*
  		*/ onpush(view help tfmt##|_new)
  SPINNER  sp_tdec      _lft2       _y    _spwd        ., 		/*
		*/ min(1) max(20) default(9)				/*
		*/ label("Total digits")
  TEXT     tx_tdec     _spsep        @    _spr2        .,		/*
		*/ label("Total digits")
  SPINNER  sp_rdec      _lft2      _ms    _spwd        ., 		/*
		*/ min(0) max(16) default(0)				/*
		*/ label("Digits right of decimal")
  TEXT     tx_rdec     _spsep        @    _spr2        .,		/*
		*/ label("Digits right of decimal")

  GROUPBOX gb_justify   _lft2      _ls    _cwd1    _ht5h, 		/*
		*/ label("Justification")
  RADIO    rb_right   _indent      _ss    _inwd        .,		/*
		*/ first						/*
		*/ option(NONE)						/*
		*/ label("Right")
  RADIO    rb_left          @      _ss        @        .,		/*
		*/ option("-")						/*
		*/ label("Left")
  RADIO    rb_center        @      _ss        @        .,		/*
		*/ last							/*
		*/ option("~")  					/*
		*/ label("Center")
  CHECKBOX ck_comma     _lft2      _ls    _cwd1        .,		/*
		*/ option("c")						/*
		*/ label("Use commas in numeric output")
  CHECKBOX ck_europe    _lft2      _ms    _cwd1        .,		/*
		*/ label("Use European commas/decimals")
  CHECKBOX ck_zero      _lft2      _ms    _cwd1        .,		/*
		*/ option("0")						/*
		*/ label("Pad with leading zeros")
END

SCRIPT g_clickon
BEGIN
  main.ck_zero.disable
  main.ck_comma.enable
  main.sp_tdec.enable
  main.sp_rdec.enable
  main.rb_center.disable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT f_clickon
BEGIN
  main.ck_zero.enable
  main.ck_comma.enable
  main.sp_tdec.enable
  main.sp_rdec.enable
  main.rb_center.disable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT e_clickon
BEGIN
  main.ck_zero.disable
  main.ck_comma.disable
  main.sp_tdec.enable
  main.sp_rdec.enable
  main.rb_center.disable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT dd_clickon
BEGIN
  main.ck_zero.disable
  main.ck_comma.disable
  main.sp_tdec.disable
  main.sp_rdec.disable
  main.rb_center.disable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT ud_clickon
BEGIN
  main.ck_zero.disable
  main.ck_comma.disable
  main.sp_tdec.disable
  main.sp_rdec.disable
  main.rb_center.disable
  main.ed_ud.enable
  main.bn_ud.enable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT s_clickon
BEGIN
  main.ck_zero.enable
  main.ck_comma.disable
  main.sp_tdec.disable
  main.sp_rdec.disable
  main.rb_center.enable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.enable
  main.tx_s.enable
  main.ed_ts.disable
  main.bn_ts.disable
END

SCRIPT ts_clickon
BEGIN
  main.ck_zero.disable
  main.ck_comma.disable
  main.sp_tdec.disable
  main.sp_rdec.disable
  main.rb_center.disable
  main.ed_ud.disable
  main.bn_ud.disable
  main.sp_s.disable
  main.tx_s.disable
  main.ed_ts.enable
  main.bn_ts.enable
END


PROGRAM command
BEGIN
	put "format %"
	if main.rb_left {
		put "-"					/* Left-justify */
	}
	if main.rb_center & main.rb_s {
		put "~"					/* Center strings */
	}
        if main.ck_zero {
		if main.rb_f | main.rb_s {
			put "0"				/* Pad w/ zeros */
		}
	}
	if main.rb_g | main.rb_f | main.rb_e {
		put main.sp_tdec
		if main.ck_europe {
			put ","	 			/* European commas */
		}
		if ! main.ck_europe {			/* Regular commas */
			put "."
		}
		put main.sp_rdec
		if main.rb_g {
			put "g"				/* General */
		}
		if main.rb_f {
			put "f"				/* Fixed */
		}
		if main.rb_e {
			put "e"				/* Exponential */
		}
	}
	if main.rb_dd | main.rb_ud | main.rb_s | main.rb_ts {
		if main.rb_dd {
			put "d"   			/* Default date */
		}
		if main.rb_ud {
			put "d" 	 		/* User-Def date */
			require main.ed_ud
			put main.ed_ud
		}
		if main.rb_ts {
			put "t" 	 		/* Time-series */
			require main.ed_ts
			put main.ed_ts
		}
		if main.rb_s {
			put main.sp_s
			put "s"				/* String */
		}
	}
	if main.ck_comma {
		if main.rb_g | main.rb_f {
			put "c"				/* Comma option */
		}
	}
	varlist main.vl_var
END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -