Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: /* */ comments inside Stata program


From   "Joseph Coveney" <[email protected]>
To   "Statalist" <[email protected]>
Subject   st: /* */ comments inside Stata program
Date   Sat, 7 Jun 2008 18:38:11 +0900

I thought that we can use /* */ to temporarily comment-out code for
debugging, but I'm obviously doing something wrong here (below).  Can
someone point it out to me?

Joseph Coveney

. program define happy
 1. version 10
 2. syntax varlist
 3. tempvar tmpvar0 tmpvar1
 4. /* quietly */ foreach var of local varlist {
 5. display in smcl as text "Happy"
 6. }
 7. end

. set trace on

. happy hgt wgt
--------------------------------------------------------------------------
begin happy ---
- version 10
- syntax varlist
- tempvar tmpvar0 tmpvar1
- /* quietly */ foreach var of local varlist {
unrecognized command:  / invalid command name
----------------------------------------------------------------------------
end happy ---
r(199);


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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