How to use Namespaces?

 

I am trying to use same name for variables and methods within different namespaces.

However, it looks to me that the namespace feature is not really working in mql.


namespace N1 {
  string var1="test";
}

namespace N2 {
  string var1="test2;
}

I get an error for N2::var1 that var1 is already defined.


Do I miss something?

 
Fernando Carreiro #:

However, it does not seem that MetaQuotes has fixed the problem yet!

Thank you!

 

I get the error:
"'' - double quotes are needed    test.mq5    14    22
"

After adding a quote after test2 it seems to work.

 
Sascha Thomas #:

I get the error:
"'' - double quotes are needed    test.mq5    14    22
"

After adding a quote after test2 it seems to work.

Yes, this bug was fixed.


Reason: