*1.0.0 24may2004
program define listp
	version 8.0
	syntax varlist, PAGEBreak(integer) [sepby(varlist) PAGENumber DISplay CLean TABLe COMpress NOCompress Fast SUBVarname NOObs ABSOlute DIVider NOTrim NOLabel NODotz SEParator(integer 5) ABBReviate(integer 0) LINEsize(integer 0) STRing(integer 0) ]

	if `abbreviate' == 0 {
		local abbr ""
	}
	else {
		local abbr "abbreviate(`abbreviate')"
	}

	if `linesize' == 0 {
		local line ""
	}
	else {
		local line "linesize(`linesize')"
	}

	foreach opt of newlist display clean table compress nocompress fast subvarname noobs absolute divider notrim nolabel nodotz {

		if "``opt''" != "" {
			local options "`options' `opt'"
		}
	}



	local n = _N
	local num = int(`n'/`pagebreak')
	local start = 1

	if "`pagenumber'" != "" {
		local page = 1
	}

	forvalues i = 1/`num' {
		local start = `start'
		local stop = `start' + `pagebreak' -1

		list `varlist' in `start'/`stop', sepby(`sepby') separator(`separator') `abbr' `line' string(`string') `options'
		local start = `stop'  + 1
		if "`pagenumber'" != "" {
			di "Page `page'"
			local page = `page' + 1
		}
		di _char(12)

	}

	if `stop' != `n' {
		list `varlist' in `stop'/l, sepby(`sepby') separator(`separator') `abbr' `line' string(`string') `options'
	}
	if "`pagenumber'" != "" {
		di "Page `page'"
	}



end