Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: is it possible to redefine a character to write more than one stata command a single line


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: is it possible to redefine a character to write more than one stata command a single line
Date   Thu, 28 Jun 2012 17:39:16 +0200

On Thu, Jun 28, 2012 at 5:18 PM, Pradipto Banerjee
<pradipto.banerjee@adainvestments.com> wrote:
> Let's say, I have two or more Stata lines
>
> by xxx: gen yyy=zzz
> by xxx1: gen yyy1=zzz1
> by xxx2: gen yyy2=zzz2
>
> Is there anything equivalent of an "operator override" in Stata such that say I can define ";" to interpret a carriage return?
>
> For example, in my ado or do codes, I would like to write in a single line
>
> by xxx: gen yyy=zzz ; by xxx1: gen yyy1=zzz1 ; by xxx2: gen yyy2=zzz2
>
> and have Stata interprets the " ; " as the carriage return.

No, there are various options for breaking up a command so it can span
multiple lines, but there is nothing for the reverse case.

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany


http://www.maartenbuis.nl
--------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index