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

st: Re: statalist-digest V4 #1069


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: statalist-digest V4 #1069
Date   Mon, 18 Nov 2002 11:57:53 -0000

--On 15 November 2002 02:33 -0500 Nick wrote

Indeed. One of several merits of -foreach-
and -forvalues- is that constructs are naturally
and readably laid out on several lines. The
bonus in being able more easily to understand, to debug,
and to modify code is substantial.
The need, or desire, to use semi-colons is
thus reduced.

Of course, semi-colons can be
used as delimiters in a very readable way
too, just as there are many difficult-to-read
programs written with carriage returns as
delimiters.
I personally find (although I am often typing trailing semicolons in perl or PHP code) that an easier construct in Stata is the

command that does not all fit on /*
*/ one line

which leads to reasonably readable (and printable) code without the necessity of semicolons.

The only time that it annoys is when you wish to comment out an entire block of code.

Kit

*
* 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