楼主: jinke1311
14877 3

[其他] 怎样在do file里断行? [推广有奖]

  • 0关注
  • 1粉丝

大专生

16%

还不是VIP/贵宾

-

威望
0
论坛币
128 个
通用积分
0.0110
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
365 点
帖子
28
精华
0
在线时间
52 小时
注册时间
2005-7-4
最后登录
2021-7-29

楼主
jinke1311 发表于 2009-8-18 17:43:09 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我有两个命令,想在do file里写在一行,中间应该用什么断开?

我尝试用 delimit,但是结果不显示出来?

谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:file delimit limit IMI Lim file

回帖推荐

arlionn 发表于4楼  查看完整内容

不好意思,没看清你的问题,答案如下(已测试): sysuse auto, clear #delimit ; des price wei; sum price wei len; reg price wei; #delimit cr

arlionn 发表于3楼  查看完整内容

* 《STATA初级视频》 * ::第一部分:: * Stata 操作 * ===================== * 第一讲 STATA简介 * ===================== *-9.2.3 断行 *-三种方式: “///” 、 “/* */” 、 #delimit 命令 *-第一种断行方式: /// sysuse auto, clea ...

dxystata 发表于2楼  查看完整内容

There are several ways of adding comments in do-files and programs (ado-files). 1. begin the line with * 2. place the comment between /* and */ delimiters 3. begin the comment with // 4. begin the comment with /// Note that the comment indicator * may only be used at the beginning of a line, but it does have the advantage that it can ...

本帖被以下文库推荐

沙发
dxystata 发表于 2009-8-18 19:16:54
There are several ways of adding comments in do-files and programs
    (ado-files).

        1.  begin the line with *

        2.  place the comment between /* and */ delimiters

        3.  begin the comment with //

        4.  begin the comment with ///

    Note that the comment indicator * may only be used at the beginning of a
    line, but it does have the advantage that it can be used interactively.
    * indicates that the line is to be ignored.  The * comment indicator may
    not be used within mata.

    The /* and */ comment delimiter has the advantage that it may be used in
    the middle of a line, but it is more cumbersome to type than the other
    comment indicators.  What appears inside /* */ is ignored.

    The // comment indicator may be used at the beginning or at the end of a
    line.  Note, however, that if the // indicator is at the end of a line,
    it must be preceded by one or more blanks.  // indicates that the rest of
    the line is to be ignored.

    The /// comment indicator instructs Stata to view from /// to the end of
    a line as a comment and to join the next line with the current line.  ///
    is one way to make long lines more readable.  Like the // comment
    indicator, the /// indicator must be preceded by one or more blanks.

藤椅
arlionn 在职认证  发表于 2009-8-18 20:19:55
jinke1311 发表于 2009-8-18 17:43
我有两个命令,想在do file里写在一行,中间应该用什么断开?

我尝试用 delimit,但是结果不显示出来?

谢谢
          *          《STATA初级视频》

          *             ::第一部分::
          *              Stata 操作
          *         =====================
          *           第一讲  STATA简介
          *         =====================

   *-9.2.3 断行
     
     *-三种方式: “///” 、 “/* */” 、 #delimit 命令
     
       *-第一种断行方式: ///
         sysuse auto, clear
         twoway (scatter price weight)       ///
                (lfit price weight),         ///
                title("散点图和线性拟合图")
               
       *-第二种断行方式: /* */
         twoway   (scatter price weight)      /*
               */ (lfit price weight),        /*
               */ title("散点图和线性拟合图")   
              
       *-第三种断行方式: #delimit 命令
         #delimit ;
           twoway (scatter price wei)
                  (lfit price wei),
                  title("散点图和线性拟合图");
         #delimit cr

板凳
arlionn 在职认证  发表于 2009-8-18 20:23:08
jinke1311 发表于 2009-8-18 17:43
我有两个命令,想在do file里写在一行,中间应该用什么断开?

我尝试用 delimit,但是结果不显示出来?

谢谢
不好意思,没看清你的问题,答案如下(已测试):

    sysuse auto, clear
        #delimit ;
             des price wei;   sum price wei len;  reg price wei;
        #delimit cr

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-20 15:55