I just found that // and * work differently in Mata.
// works as expected, but * works inconsistently.
The following example shows that both // and * work as commenting commands.
However, the following example shows that * does not work as a commenting command.
// works as expected, but * works inconsistently.
The following example shows that both // and * work as commenting commands.
Code:
. clear all
. mata
: h=10
: h
10
: end
.
. clear all
. mata
: //h=10
: h
<istmt>: 3499 h not found
r(3499);
: end
.
. clear all
. mata
: *h=10
<istmt>: 3499 h not found
r(3499);
: h
<istmt>: 3499 h not found
r(3499);
: end
Code:
. clear all
. mata
: h=10
: st_numscalar("H",h)
: end
. di H
10
.
. clear all
. mata
: h=10
: //st_numscalar("H",h)
: end
. di H
H not found
r(111);
. clear all
. mata
: h=10
: *st_numscalar("H",h)
<istmt>: 3257 nonpointer found where pointer required
r(3257);
: end
. di H
10

Comment