Re: [問題] 請問有關stata的profile.do的設定問題

看板Statistics作者 (:P)時間18年前 (2007/10/17 10:15), 編輯推噓2(201)
留言3則, 1人參與, 最新討論串2/2 (看更多)
我裡面的code是照抄老師的貼 adopath ="c:\ado\personal" set type double set memory 500m set maxvar 5000 set matsize 5000 local cd : di%tdYND d('c(current_date)') local ct = "'c(current_time)'" local ct : subinstr local ct ":" " ", all local file = "'cd'"+"_"+"'ct'" log using "c:\ado\ss'file'.log", text replace cmdlog using "c:\ado\ss'file'.log", append 但其實第一次上課的時候 老師只強調最後兩行而已 所以我有試過只用最後兩行 可是還是出現一樣的結果 麻煩各位大大幫忙了 >"< ※ 引述《litia (:P)》之銘言: : 很不好意思 這好像是個很基本的問題 ^^"" : 因為是旁聽生 不敢跟別的同學討論這個應該很簡單的問題 : 因此想請問各位幫忙 拜託了 m(_ _)m : 就是下載stata後 我們老師叫我們要設一個profile.do的檔 : 之後每次開啟stata的時候 他就會先自動執行這個檔案裡面的內容 : 裡面可以改設memory的大小 和儲存command等等 : 你之後就可以搜尋得到你之前所用過的各項指令 : 我現在的問題是 每次我開啟stata時 他run了我的profile.do之後 : 下面一行就顯示program error: code follows on the same line as open brace : 我完全不知道要怎麼解決 有試著去修正我profile.do的內容也都沒有用 : 當然我profile.do裡面的一些指令也不會去執行 : 想請問 我到底是哪裡的設定出了問題? 謝謝回答 :) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.99.26

10/17 11:59, , 1F
I am not sure this will solve your problem, but Stata uses
10/17 11:59, 1F

10/17 12:00, , 2F
` ' , not ' '. ` is the key beside 1.
10/17 12:00, 2F
謝謝這位大大 不過好像還是沒辦法 XD 一開始我們老師只有說用這兩個指令 可以儲存我們的程式 log using c:\ado\stata.log, text replace cmdlog using c:\ado\command.log, append 其中那個.log檔名也是自己隨意取 容易辨識用而已 我有試過只用這兩行去執行 也都不行 所以非常頭大 ※ 編輯: litia 來自: 140.114.131.92 (10/17 13:46)

10/18 09:00, , 3F
set trace on => this will tell you which line goes wrong.
10/18 09:00, 3F
文章代碼(AID): #175N1TnH (Statistics)
文章代碼(AID): #175N1TnH (Statistics)