楼主: 杨青青
8975 6

[数据管理求助] 请教#delimit ;的问题 [推广有奖]

  • 0关注
  • 0粉丝

已卖:213份资源

本科生

9%

还不是VIP/贵宾

-

威望
0
论坛币
690 个
通用积分
0.4800
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
255 点
帖子
40
精华
0
在线时间
83 小时
注册时间
2009-2-20
最后登录
2020-9-14

楼主
杨青青 发表于 2009-12-20 12:56:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
我在命令窗口输入#delimit ;后出现unknown #command,这是为什么?恳请回答,谢谢!
二维码

扫码加我 拉你入群

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

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

关键词:delimit limit del Eli MIT command

沙发
sungmoo 发表于 2009-12-20 13:07:38
command窗口中不能使用,只能在do-file-editor窗口中使用。
已有 1 人评分经验 收起 理由
SpencerMeng + 100 热心帮助其他会员

总评分: 经验 + 100   查看全部评分

藤椅
杨青青 发表于 2009-12-20 14:05:22
谢谢回答! 2# sungmoo

板凳
mdzlm 发表于 2015-6-21 19:45:51
这个不make sense啊,我看也有人说只有在后面接了# delimit cr 才能完整的引用里面的命令,但我把完整的语句复制进去了还是会出现unknown #command,是没有安装什么程序,所以stata无法识别么

报纸
蓝色 发表于 2015-6-21 21:29:04
前面人不是写了方法了吗

那个只能在do文件里面用
不能再命令窗口里面写。

要看人家给你们的解答。

地板
蓝色 发表于 2015-6-21 21:29:52
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

        --- begin myfile1.do ---------------------------
        use mydata, clear
        #delimit ;
        regress lnwage educ complete age c.age#c.age
                exp c.exp#c.exp tenure c.tenure#c.tenure
                i.region female ;
        predict e, resid ;
        #delimit cr
        summarize e, detail
        --- end myfile1.do -----------------------------


    Another way to do this without #delimit would be

        --- begin myfile2.do ---------------------------------
        use mydata, clear
        regress lnwage educ complete age c.age#c.age /*
                */ exp c.exp#c.exp tenure c.tenure#c.tenure /*
                */ i.region female
        predict e, resid
        summarize e, detail
        --- end myfile2.do -----------------------------------

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


Technical note

    Just because you have long lines does not mean that you must change the
    delimiter to semicolon.  Stata does not care that the line is long.  There are
    also other ways to indicate that more than one physical line is one logical
    line.  One popular choice is ///:

        regress lnwage educ complete age c.age#c.age     ///
                exp c.exp#c.exp tenure c.tenure#c.tenure ///
                i.region female

    See [P] comments.

7
卢冲 学生认证  发表于 2020-6-21 17:17:44
京津冀会更好

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

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