Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: While loop and input command


From   [email protected]
To   [email protected]
Subject   st: While loop and input command
Date   Mon, 21 Oct 2002 13:43:17 +0100

I am having a problem running a do file that contains a while loop.  Within
the while loop, I have the following input commands:

input str16 agegroup
	""
	"age0"
	"ages1to4"
	"ages5to9"
	"ages10to14"
	"ages15to19"
	"ages20to24"
	"ages25to29"
	"ages30to34"
	"ages35to39"
	"ages40to44"
	"ages45to49"
	"ages50to54"
	"ages55to59"
	"ages60to64"
	"ages65to69"
	"ages70to74"
	"ages75to79"
	"ages80to84"
	"ages85plus"
	"total"
end  

When I run the do-file I get the r(1) break message immediately after this
command.  However, when I remove the above command the do-file runs fine.
Has anybody encountered similar problems, and is there any way of getting
round this.
Thank you for your time,

Christopher D Fergusson
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index