Stata 11 help for delimit

help #delimit -------------------------------------------------------------------------------

Title

[P] #delimit -- Change delimiter

Syntax

#delimit { cr | ; }

Description

The #delimit command resets the character that marks the end of a command. It can be used only in do-files and ado-files.

Remarks

#delimit (pronounced pound-delimit) is a Stata preprocessor command. #commands do not generate a return code, nor do they generate ordinary Stata errors. The only error message associated with #commands is "unrecognized #command".

Commands given from the console are always executed when you press the Enter, or Return, key. #delimit cannot be used interactively, so you cannot change Stata's interactive behavior.

Commands in a do-file, however, may be delimited with a carriage return or a semicolon. When a do-file begins, the delimiter is a carriage return. The command "#delimit ;" changes the delimiter to a semicolon. To restore the carriage return delimiter inside a file, use #delimit cr.

When a do-file begins execution, the delimiter is automatically set to carriage return, even if it was called from another do-file that set the delimiter to semicolon. Also, the current do-file need not worry about restoring the delimiter to what it was because Stata will do that automatically.

Examples

--- top of myfile1.do --------------- use mydata, clear #delimit ; regress lnwage educ complete age age2 exp exp2 tenure tenure2 reg1-reg3 female ; predict e, resid ; #delimit cr summarize e, detail --- end of myfile1.do ---------------

Another way to do this without #delimit would be

--- top of myfile2.do ------------------ use mydata, clear regress lnwage educ complete age age2 /* */ exp exp2 tenure tenure2 /* */ reg1-reg3 female predict e, resid summarize e, detail --- end of myfile2.do ------------------

See [U] 16.1.3 Long lines in do-files for more information.

Also see

Manual: [P] #delimit

Help: [P] comments, [U] 10 Keyboard use


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