Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • semicolons in struct definition cause "type definition required" error

    I may be in a small minority that use semicolons in Mata, and perhaps nobody else has found this before. If I use semicolons in a struct definition, like this:

    Code:
    struct Treenode {
            real matrix orders;
            real matrix ordered;
            real matrix sorted_data;
     }
    then I will get an error:

    Code:
    type declaration required
    (48 lines skipped)
    --------------------------------------------------------------------------------------------
    r(3000);
    It took me a while to work out the cause. I reluctantly guess this is a bug... but maybe others know of a reason? The Mata Book doesn't use semicolons so it isn't mentioned.
Working...
X