[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: advantage of using #delimit ;

From   "Newson, Roger B" <>
To   <>
Subject   st: RE: advantage of using #delimit ;
Date   Wed, 2 Jul 2008 20:10:50 +0100

I personally use
#delim ;
most of the time, because I write so many multi-line commands
(especially when drawing graphs), and I therefore find that remembering
to insert a ; at the end of each command involves less effort than
writing /// or /**/ at the end of each line that does not terminate a
command. Also, I got into the habit of writing ; at the end of commands
when programming in SAS or C. It is also possible to use the ; delimiter
to write multi-column lines, but I try not to write too many of these,
as they make the program less easy to read.

However, when writing Mata programs, I always type
#delim cr
before typing any Mata code, as Mata was designed to work in that mode.

However, the carriage return delimiter seems to be preferred by most
users, most of the time, especially people at StataCorp, who write the
ado-files of official Stata.

I hope this helps.


Roger B Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

-----Original Message-----
[] On Behalf Of Man Jia
Sent: 02 July 2008 19:02
Subject: st:advantage of using #delimit ; 

Dear statalists,

As to long lines in do-files, I know I can use #delimit ; to change the 
end-of-line delimiter to ';'. Or I can use /// or /**/comment indicator.

 So, I was wondering if there's any advantage of using #delimit ; 
instead of /// or /**/. I'm thinking  the first method means you have  
to type ; at the end of each line,while if I use the second way  I need 
to type /// or /**/ only when there are long lines. But I do have seen 
a lot of people prefer #delimit ;. Is there any reason for this?

Thanks for your time!

*   For searches and help try:

*   For searches and help try:

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