Archived

This forum has been archived. Please start a new discussion on GitHub.

docs: reference to other modules in slice

I need to refer from one module to another in Slice. Using C++ notation seems to work but I couldn't find any explicit mention of this in Sec. 4.6.
// Slice

module mod1
{
    struct S1
    {
          int i;
     }
}

module mod2
{
    struct S2
    {
          ::mod1::S1 s;
     }
}

Comments

  • What you are doing is legal and exactly as intended. See page 142 in the manual.

    Cheers,

    Michi.
  • Thanks Michi, that's exactly what i was looking for.
    alex