/*
	integ

*!  VERSION 1.0.1  02apr2005

*/

VERSION 8.0

INCLUDE _std_medium
DEFINE _dlght 270
INCLUDE header
HELP hlp1, view("help integ")
RESET res1

DIALOG main,	label("integ - Calculate numeric integrals") tabtitle("Main")
BEGIN
        TEXT	tx_yvar		_lft	_top	_cwd1	.,		/*
		*/	label("Y variable:")

        VARNAME	vn_yvar		@	_ss	_vnwd	.,		/*
		*/	label("Y variable")

        TEXT	tx_xvar		_lft2	_top	_cwd1	.,		/*
		*/	label("X variable:")

        VARNAME	vn_xvar		@	_ss	_vnwd	.,		/*
		*/	label("X variable")

        TEXT	tx_gen		_lft	_ls	_iwd	.,		/*
		*/	label("Generate new variable:")

        EDIT   	ed_gen		@	_ss	_vnwd	.,		/*
		*/	label("Generate variable")			/*
		*/	option(generate)

	GROUPBOX gb_rule	@	+35	_iwd	_ht4,		/*
		*/	label("Rules")

	RADIO	rb_cubic	_indent	_ss	_inwd	.,		/*
		*/	label("Cubic splines")				/*
		*/	first						/*
		*/	option(NONE)

	RADIO	rb_trapeziod	@	_ss	@	.,		/*
		*/	label("Trapezoidal rule")			/*
		*/	last						/*
		*/      option(trapezoid)

	SPINNER	sp_initial	_lft	+45	_spwd	.,		/*
		*/	min(0) max(10000)				/*
		*/	default(0)					/*
		*/	label("Initial value of integral")		/*
		*/	option(initial)

	TEXT	tx_init		_spsep	@	_sprb	.,		/*
		*/	label("Initial value of integral")

        CHECKBOX ck_replace     _lft	_ls     _iwd    .,              /*
                */      label("Overwrite the existing variable")	/*
		*/	option(replace)
END

INCLUDE byifin

PROGRAM command
BEGIN
	INCLUDE _by_pr
	put "integ "
	varlist main.vn_yvar
	varlist main.vn_xvar
	INCLUDE _ifin_pr
	beginoptions
		optionarg main.ed_gen
		option main.ck_replace
		option radio(main rb_cubic rb_trapeziod)
		optionarg /hidedefault main.sp_initial
	endoptions
END

