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

st: RE: Comment indicator * produces error in Mata


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Comment indicator * produces error in Mata
Date   Tue, 24 May 2005 05:08:30 -0500

Within Mata * is monadic operator.  See, [M-2] Pointers

Scott

> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Jann, Ben
> Sent: Tuesday, May 24, 2005 4:35 AM
> To: [email protected]
> Subject: st: Comment indicator * produces error in Mata
> 
> 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index