Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Comment indicator * produces error in Mata


From   "Jann, Ben" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Comment indicator * produces error in Mata
Date   Tue, 24 May 2005 11:35:28 +0200

Hi,
it appears that the * comment indicator, which may be used at 
the beginning of a line to indicate that the line is to be 
ignored (see -help comments-), cannot be used with Mata. 
Example:

  : void somefunction()
  > {
  > *       display("some text")
  > }

  : somefunction()
  some text
            somefunction():  3257  nonpointer found where pointer
required
                   <istmt>:     -  function returned error
  (0 lines skipped)

The error also occurs if somefunction() is defined whithin an 
ado file. Other comment indicators like // or /**/ work fine.

If one really thinks hard about how the different comment 
indicators are handeled in Stata, it is not surprising that 
the * comment indicator does not work in Mata. Nonetheless, 
I think that this is bad news for people being accustomed to 
using the * comment indicator. 

Even more bad news is that the problem is not mentionned in the
documentation (at least not in places where one would look for it
such as -help comment-, [M-1] first, [M-1] ado, [U] 16.1.2, or 
[U] 18.11.2). I hope that this will change in a future update.

grumble...
ben

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index